From 86bd7f036abd900e16dcff5b6e6cb05200f4eab0 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 10 Jun 2024 11:01:30 -0700 Subject: [PATCH] More comments --- docker/mobile/.env-mobile | 4 ++++ test_mobile/README.md | 23 +++++++++++++++-------- test_mobile/tests/integration_test.rs | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/docker/mobile/.env-mobile b/docker/mobile/.env-mobile index dcd622fec..22c3169a8 100644 --- a/docker/mobile/.env-mobile +++ b/docker/mobile/.env-mobile @@ -1,8 +1,12 @@ RUST_BACKTRACE=1 +# As the be set for s3 file store AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN=AWS_SESSION_TOKEN +# Ingest: use timestamps sent by client. This allows to send heartbeats from 24 hours ago. HONOR_TIMESTAMP=0 + +# Mobile Verifier: Allow to process heartbeats that are more than 3 hours old. PROCESS_FILE_EPOCH_MIN=48 diff --git a/test_mobile/README.md b/test_mobile/README.md index 749a8b3f7..0d6b3c288 100644 --- a/test_mobile/README.md +++ b/test_mobile/README.md @@ -2,25 +2,32 @@ ## Setup -### 1. Generate data +### 1. Generate Data **NOTE:** Data is auto-generated. If you do not wish to change it, skip these steps. The commands are here to show how the data is generated. -- Run `test-mobile assignment` and move the generated files[^files] to `docker/mobile/localstack/data/mobile-verifier-data-sets/` -- Run `AWS_ACCESS_KEY_ID=X AWS_SECRET_ACCESS_KEY=X AWS_SESSION_TOKEN=X test-mobile price` and move the generated file to `docker/mobile/localstack/data/mobile-price/`. This can also be ran when localstack is up and will uopload files. +- Run `test-mobile assignment` and move the generated files[^files] to `docker/mobile/localstack/data/mobile-verifier-data-sets/`. +- Run `AWS_ACCESS_KEY_ID=X AWS_SECRET_ACCESS_KEY=X AWS_SESSION_TOKEN=X test-mobile price` and move the generated file to `docker/mobile/localstack/data/mobile-price/`. This can also be run when LocalStack is up and will upload files. -### 2. Build Docker images +### 2. Build Docker Images -- Navigate to the `docker` directory: `cd docker` +- Navigate to the `docker` directory: `cd docker/mobile` - Build the Docker images: `docker compose build` -### 3. Run tests +### 3. Run Tests - Run the integration tests: `cargo test --package test-mobile --test integration_test -- --nocapture` -**NOTE:** The test will `docker compose up` on start and `docker compose stop` at the end. It is up to **you** to `docker compose down` if you want to clean up. +**NOTE:** The test will run `docker compose up` on start and `docker compose down -v` at the end (if the test is successful). [^files]: Maps of hexes used ![Hexes](docs/hexes.jpg "Hexes") -key pair for coverage object `13te9quF3s24VNrQmBRHnoNSwWPg48Jh2hfJdqFQoiFYiDcDAsp` \ No newline at end of file +## Others + +### Keypairs + +- `13te9quF3s24VNrQmBRHnoNSwWPg48Jh2hfJdqFQoiFYiDcDAsp` Coverage object +- `14FGkBKPAdBuCtKGFkSnUmvoUBkJGjKVLrPrNLXKN3NgMiLTtwm` Mobile Verifier +- `14c5dZUZgFEVcocB3mfcjhXEVqDuafnpzghgyr2i422okXVByPr` Mobile Packer Verifier +- `131kC5gTPFfTyzziHbh2PWz2VSdF4gDvhoC5vqCz25N7LFtDocF` Mobile Config \ No newline at end of file diff --git a/test_mobile/tests/integration_test.rs b/test_mobile/tests/integration_test.rs index 054665f50..2040ada79 100644 --- a/test_mobile/tests/integration_test.rs +++ b/test_mobile/tests/integration_test.rs @@ -78,7 +78,7 @@ async fn main() -> Result<()> { .submit_speedtest(hours_ago(1), 500_000_000, 500_000_000, 25) .await?; - // giving time for submit_coverage_object FIXME + // FIXME: giving time for submit_coverage_object let _ = tokio::time::sleep(Duration::from_secs(60)).await; for x in (1..=24).rev() {