[bitnami/nats] Adapt NATS tests to Air-gapped environments

Signed-off-by: Jota Martos <jotamartos@vmware.com>
This commit is contained in:
Jota Martos
2023-08-07 16:05:05 +02:00
parent a6e91d36d8
commit 3aa2dcacca
4 changed files with 15 additions and 2 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ command:
## We need to have the subscriber process running at the same time the publishing is done
## The sleep is needed to avoid a race condition where the publishing is done before the subscriber is ready
## The subscriber process needs to be timed out so there is no dangling process making goss timeout
exec: ( USER={{ $running_user }} timeout 10 nats {{ $auth }} {{ $lb_endpoint }} sub {{ $subject }}; ) & sleep 3 && USER={{ $running_user }} nats {{ $auth }} {{ $lb_endpoint }} pub {{ $subject }} {{ $msg }}
exec: ( USER={{ $running_user }} timeout 10 ./nats/goss/testfiles/nats {{ $auth }} {{ $lb_endpoint }} sub {{ $subject }}; ) & sleep 3 && USER={{ $running_user }} ./nats/goss/testfiles/nats {{ $auth }} {{ $lb_endpoint }} pub {{ $subject }} {{ $msg }}
exit-status: 0
stdout:
- /Received on.*{{ $subject }}/
@@ -29,7 +29,7 @@ command:
{{- $subject := printf "subj_%s" (randAlpha 5) }}
{{- $msg := printf "msg_%s" (randAlpha 5) }}
{{- $pod_endpoint := printf "-s nats://nats-%d.nats-headless:%s" $i $client_port }}
exec: ( USER={{ $running_user }} timeout 10 nats {{ $auth }} {{ $pod_endpoint }} sub {{ $subject }}; ) & sleep 3 && USER={{ $running_user }} nats {{ $auth }} {{ $lb_endpoint }} pub {{ $subject }} {{ $msg }}
exec: ( USER={{ $running_user }} timeout 10 ./nats/goss/testfiles/nats {{ $auth }} {{ $pod_endpoint }} sub {{ $subject }}; ) & sleep 3 && USER={{ $running_user }} ./nats/goss/testfiles/nats {{ $auth }} {{ $lb_endpoint }} pub {{ $subject }} {{ $msg }}
exit-status: 0
stdout:
- /Received on.*{{ $subject }}/
+7
View File
@@ -0,0 +1,7 @@
# How to update this folder
* Download the latest binary from the [GitHub repository](https://github.com/nats-io/natscli/releases) using the downloadCLI.sh script
```
./downloadCLI.sh
```
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
cd "$(git rev-parse --show-toplevel)/.vib/nats/goss/testfiles/"
curl -Ls https://api.github.com/repos/nats-io/natscli/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | xargs curl -L -o /tmp/nats-cli.zip
unzip -jo /tmp/nats-cli.zip '*/nats'
rm -rf /tmp/nats-cli.zip
BIN
View File
Binary file not shown.