Skip to content

Commit

Permalink
Change integration tests so they use new auth, and include an auth-fi…
Browse files Browse the repository at this point in the history
…le test as well
  • Loading branch information
nsoblath committed Aug 29, 2024
1 parent f77c6af commit fb3af3a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
16 changes: 12 additions & 4 deletions testing/integration/dl-tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
#! /usr/bin/env bats

@test "ping simple" {
dl-agent -vv -b rabbit-broker --auth-file /auths.json cmd simple -s ping
dl-agent -vv -b rabbit-broker -u dripline --password-file /dl_pw.txt cmd simple -s ping
}

@test "get simple" {
dl-agent -vv -b rabbit-broker --auth-file /auths.json get simple
dl-agent -vv -b rabbit-broker -u dripline --password-file /dl_pw.txt get simple
}

@test "set simple" {
dl-agent -vv -b rabbit-broker --auth-file /auths.json set simple 500
dl-agent -vv -b rabbit-broker -u dripline --password-file /dl_pw.txt set simple 500
}

@test "user/pass on CL" {
dl-agent -vv -b rabbit-broker -u dripline --password dripline get simple
}

@test "user on CL/pass in file" {
dl-agent -vvv -b rabbit-broker -u dripline --password-file /root/password.txt get simple
dl-agent -vvv -b rabbit-broker -u dripline --password-file /dl_pw.txt get simple
}

@test "user/pass as environment variables" {
DRIPLINE_USER=dripline DRIPLINE_PASSWORD=dripline dl-agent -vvv -b rabbit-broker get simple
}

@test "auth file" {
dl-agent -vv -b rabbit-broker --auth-file /auths.json get simple
}
2 changes: 1 addition & 1 deletion testing/integration/docker-compose-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ services:
volumes:
- ./dl-tests.sh:/root/dl-tests.sh
- ./rabbitmq_for_dl_collection.json:/root/rabbitmq_for_dl_collection.json
- ./password.txt:/root/password.txt
command: >
bash -c "sleep 1 &&
newman run /root/rabbitmq_for_dl_collection.json &&
/root/dl-tests.sh"
configs:
- dl_pw.txt
- auths.json
6 changes: 4 additions & 2 deletions testing/integration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ services:
rabbit-broker:
condition: service_healthy
command: >
bash -c "run_simple_service -vvv -b rabbit-broker --auth-file /auths.json"
bash -c "run_simple_service -vvv -b rabbit-broker -u dripline --password-file /dl_pw.txt"
configs:
- auths.json
- dl_pw.txt

configs:
dl_pw.txt:
file: ./password.txt
auths.json:
file: ./authentications.json

0 comments on commit fb3af3a

Please sign in to comment.