Skip to content

Commit

Permalink
cicd: fix authenticate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkropachev committed Jan 23, 2025
1 parent 918e522 commit 457fe8e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/authenticate_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,24 @@ env:
RUST_BACKTRACE: full

jobs:
# PasswordAuthenticator
build:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
scylladb:
image: scylladb/scylla
command: --authenticator PasswordAuthenticator
ports:
- 9042:9042
options: --health-cmd "cqlsh --username cassandra --password cassandra --debug" --health-interval 5s --health-retries 30
- name: run tests
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Run tests
run: RUST_LOG=trace cargo test --verbose authenticate_superuser -- custom_authentication --ignored
- name: Checkout
uses: actions/checkout@v3

- name: Update rust toolchain
run: rustup update

- name: Start the cluster
run: docker compose -f test/cluster/docker-compose-passauth.yml stop

- name: Run tests
run: RUST_LOG=trace cargo test --verbose authenticate_superuser -- custom_authentication --ignored

- name: Stop the cluster
if: ${{ always() }}
run: docker compose -f test/cluster/docker-compose-passauth.yml stop

- name: Print the cluster logs
if: ${{ always() }}
run: docker compose -f test/cluster/docker-compose-passauth.yml logs
21 changes: 21 additions & 0 deletions test/cluster/docker-compose-passauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.7"

networks:
public:
name: scylla_rust_driver_public
driver: host

services:
scylla1:
image: scylladb/scylla
command: |
--skip-wait-for-gossip-to-settle 0
--ring-delay-ms 0
--smp 1
--memory 512G
--authenticator PasswordAuthenticator
healthcheck:
test: [ "CMD", "cqlsh", "scylla1", "-e", "select * from system.local" ]
interval: 5s
timeout: 5s
retries: 60

0 comments on commit 457fe8e

Please sign in to comment.