Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
macpie committed Jun 10, 2024
1 parent c5d4587 commit 86bd7f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docker/mobile/.env-mobile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 15 additions & 8 deletions test_mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
## Others

### Keypairs

- `13te9quF3s24VNrQmBRHnoNSwWPg48Jh2hfJdqFQoiFYiDcDAsp` Coverage object
- `14FGkBKPAdBuCtKGFkSnUmvoUBkJGjKVLrPrNLXKN3NgMiLTtwm` Mobile Verifier
- `14c5dZUZgFEVcocB3mfcjhXEVqDuafnpzghgyr2i422okXVByPr` Mobile Packer Verifier
- `131kC5gTPFfTyzziHbh2PWz2VSdF4gDvhoC5vqCz25N7LFtDocF` Mobile Config
2 changes: 1 addition & 1 deletion test_mobile/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 86bd7f0

Please sign in to comment.