Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol committed Sep 14, 2023
1 parent a05c17b commit a66f429
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1117,18 +1117,24 @@ jobs:
uses: actions/download-artifact@v3
with:
name: fluvio-run-x86_64-unknown-linux-musl
path: ~/.fluvio/extensions
path: ~/extensions


- run: |
chmod +x ~/bin/fluvio
chmod +x ~/extensions/fluvio-run
mkdir -p ~/.fluvio/bin
mkdir -p ~/.fluvio/extensions
mv ~/bin/fluvio ~/.fluvio/bin/fluvio
mv ~/extensions/fluvio-run ~/.fluvio/extensions/fluvio-run
- name: Start cluster in read-only mode
run: |
~/.fluvio/bin/fluvio cluster start --read-only crates/fluvio-cluster/test-data/metadata.json
- name: Run Fluvio read-only tests
run: make FLUVIO_BIN=/home/runner/bin/fluvio cli-fluvio-read-only-smoke
run: make FLUVIO_BIN=/home/runner/.fluvio/bin/fluvio cli-fluvio-read-only-smoke

- name: Print SC logs
if: ${{ !success() }}
Expand Down
11 changes: 4 additions & 7 deletions tests/cli/fluvio_read_only/basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,20 @@ teardown_file() {
run timeout 15s "$FLUVIO_BIN" cluster shutdown --local
}

# Create topic
@test "Create a topic" {
@test "Cannot create a new topic" {
debug_msg "topic: $TOPIC_NAME"
run timeout 15s "$FLUVIO_BIN" topic create other-topic
assert_success
assert_output --partial "permission denied"

}

# Produce message
@test "Produce message" {
@test "Can produce message in existing topic" {
run bash -c 'echo "$MESSAGE" | timeout 15s "$FLUVIO_BIN" produce "$TOPIC_NAME"'
assert_success
}

# Consume message and compare message
# Warning: Adding anything extra to the `debug_msg` skews the message comparison
@test "Consume message" {
@test "Can consume message in existing topic" {
run timeout 15s "$FLUVIO_BIN" consume "$TOPIC_NAME" -B -d

assert_output --partial "$MESSAGE"
Expand Down

0 comments on commit a66f429

Please sign in to comment.