Skip to content

Commit

Permalink
fix: list API compatibility issues with old versions (#4248)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev authored Nov 11, 2024
1 parent f86fe12 commit 2f31d45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/fluvio-sc-schema/src/objects/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ where

impl Request for ObjectApiListRequest {
const API_KEY: u16 = AdminPublicApiKey::List as u16;
const MIN_API_VERSION: i16 = 15;
const DEFAULT_API_VERSION: i16 = COMMON_VERSION;
type Response = ObjectApiListResponse;
}
Expand Down
18 changes: 18 additions & 0 deletions tests/cli/cli-platform-cross-version.bats
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ teardown_file() {
assert_success
}

# List topics
@test "List topics" {
run timeout 15s "$FLUVIO_CLIENT_BIN" topic list

assert_success
assert_line --partial --index 1 "$TOPIC_NAME"
assert [ ${#lines[@]} -eq 2 ]
}

# List partitions
@test "List partitions" {
run timeout 15s "$FLUVIO_CLIENT_BIN" partition list

assert_success
assert_line --partial --index 1 "$TOPIC_NAME"
assert [ ${#lines[@]} -eq 2 ]
}

# Consume message and compare message
# Warning: Adding anything extra to the `debug_msg` skews the message comparison
@test "Consume message" {
Expand Down

0 comments on commit 2f31d45

Please sign in to comment.