Skip to content

Commit

Permalink
Maybe maybe maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
bai committed Feb 1, 2022
1 parent 1b678fe commit 88343a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
go-version: [1.16.x, 1.17.x]
kafka-version: [2.8.1, 3.0.0, 3.1.0]
kafka-version: [3.0.0, 3.1.0]
platform: [ubuntu-latest]

env:
Expand Down
17 changes: 1 addition & 16 deletions functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,13 @@ func prepareDockerTestEnvironment(ctx context.Context, env *testEnvironment) err
if version, ok := os.LookupEnv("KAFKA_VERSION"); ok {
env.KafkaVersion = version
} else {
// We have cp-7.0.0 as the default in the docker-compose file, so that's kafka 3.0.0.
env.KafkaVersion = "3.1.0"
}

// the mapping of confluent platform docker image versions -> kafka versions can be
// found here: https://docs.confluent.io/current/installation/versions-interoperability.html
var confluentPlatformVersion string
switch env.KafkaVersion {
case "3.1.0":
confluentPlatformVersion = "3.1.0"
case "3.0.0":
confluentPlatformVersion = "3.0.0"
case "2.8.1":
confluentPlatformVersion = "2.8.1"
default:
return fmt.Errorf("don't know what confluent platform version to use for kafka %s", env.KafkaVersion)
}

c := exec.Command("docker-compose", "up", "-d")
c.Stdout = os.Stdout
c.Stderr = os.Stderr
c.Env = append(os.Environ(), fmt.Sprintf("CONFLUENT_PLATFORM_VERSION=%s", confluentPlatformVersion))
c.Env = append(os.Environ(), fmt.Sprintf("CONFLUENT_PLATFORM_VERSION=%s", env.KafkaVersion))
err := c.Run()
if err != nil {
return fmt.Errorf("failed to run docker-compose to start test environment: %w", err)
Expand Down

0 comments on commit 88343a0

Please sign in to comment.