Skip to content

Commit

Permalink
Update tests readme with HA smoketest info. Add debug scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Sep 6, 2023
1 parent f78e3e3 commit 4d55f3b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
34 changes: 34 additions & 0 deletions TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ $ go test -v ./tests/...
$ simple-transfer dispose
```

The HA smoketest is very similar. There's one additional flag needed when creating the instance.

```
$ simple-transfer create -l ha=true
```

So the full set of steps for running the HA smoketest locally are:

```
$ cd zititest
$ go install ./...
$ simple-transfer create -l ha=true
$ ZITI_VERSION=0.0.0 simple-transfer up
$ go test -v ./tests/...
$ simple-transfer dispose
```

## Debugging smoketests

When a smoketest runs in Github, the fablab instance data is uploaded to s3. This includes
Expand All @@ -44,3 +61,20 @@ To delete the instance data out of S3, you would run:
```
aws s3 rm s3://ziti-smoketest-fablab-instances/simple-transfer-$1.tar.gz.gpg
```

The HA smoketest is very similar.

```
aws s3 cp s3://ziti-smoketest-fablab-instances/simple-transfer-ha-$1.tar.gz.gpg ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
FABLAB_PASSPHRASE=<passphrase goes here> simple-transfer import ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
rm ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
```
You would pass the workflow run number into the script. If you need the GPG passphrase, please ask.

To delete the instance data out of S3, you would run:

```
aws s3 rm s3://ziti-smoketest-fablab-instances/simple-transfer-ha-$1.tar.gz.gpg
```


4 changes: 4 additions & 0 deletions zititest/scripts/get-ha-smoke-instance
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# You must have a FABLAB_PASSPHRASE environment variable set with the GPG key to decrypt the smoketests
aws s3 cp s3://ziti-smoketest-fablab-instances/simple-transfer-ha-$1.tar.gz.gpg ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
simple-transfer import ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
rm ${HOME}/Downloads/simple-transfer-ha-$1.tar.gz.gpg
4 changes: 4 additions & 0 deletions zititest/scripts/get-smoke-instance
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# You must have a FABLAB_PASSPHRASE environment variable set with the GPG key to decrypt the smoketests
aws s3 cp s3://ziti-smoketest-fablab-instances/simple-transfer-$1.tar.gz.gpg ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg
simple-transfer import ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg
rm ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg

0 comments on commit 4d55f3b

Please sign in to comment.