Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd: fix authenticate tests #1179

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/authenticate_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ env:
RUST_BACKTRACE: full

jobs:
# PasswordAuthenticator
build:
timeout-minutes: 60
name: Run Authentication tests
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
steps:
- uses: actions/checkout@v3
- 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 up -d

- name: Run tests
run: RUST_LOG=trace cargo test --verbose authenticate_superuser -- custom_authentication --ignored
run: SCYLLA_URI=172.43.0.2 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
28 changes: 28 additions & 0 deletions test/cluster/docker-compose-passauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
networks:
public:
name: scylla_rust_driver_passauth_public
driver: bridge
ipam:
driver: default
config:
- subnet: 172.43.0.0/24

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