From 7b8994a0578af144879f919579cfeaaa971a7e81 Mon Sep 17 00:00:00 2001 From: "Meggle (Sebastian Bathke)" Date: Sun, 8 Sep 2024 09:44:40 +0200 Subject: [PATCH] test: use zeebe 8.6.0-alpha5 for tests --- cmd/zbctl/main_test.go | 2 +- internal/containersuite/containerSuite.go | 23 +---------------------- test/integration_test.go | 2 +- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/cmd/zbctl/main_test.go b/cmd/zbctl/main_test.go index 8179d69a..1618e73a 100644 --- a/cmd/zbctl/main_test.go +++ b/cmd/zbctl/main_test.go @@ -252,7 +252,7 @@ func TestZbctlWithInsecureGateway(t *testing.T) { &integrationTestSuite{ ContainerSuite: &containersuite.ContainerSuite{ WaitTime: time.Second, - ContainerImage: "camunda/zeebe:current-test", + ContainerImage: "camunda/zeebe:8.6.0-alpha5", Env: map[string]string{ "ZEEBE_BROKER_GATEWAY_LONGPOLLING_ENABLED": "false", }, diff --git a/internal/containersuite/containerSuite.go b/internal/containersuite/containerSuite.go index 03711990..c44adb11 100644 --- a/internal/containersuite/containerSuite.go +++ b/internal/containersuite/containerSuite.go @@ -25,7 +25,6 @@ import ( "github.com/camunda/camunda/clients/go/v8/internal/utils" "github.com/camunda/camunda/clients/go/v8/pkg/pb" "github.com/camunda/camunda/clients/go/v8/pkg/zbc" - "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/stretchr/testify/suite" "github.com/testcontainers/testcontainers-go" @@ -206,6 +205,7 @@ func (s *ContainerSuite) SetupSuite() { "ZEEBE_BROKER_NETWORK_HOST": "0.0.0.0", "ZEEBE_BROKER_NETWORK_ADVERTISEDHOST": "0.0.0.0", }, + AlwaysPullImage: true, }, Started: true, } @@ -216,10 +216,6 @@ func (s *ContainerSuite) SetupSuite() { } ctx := context.Background() - err = validateImageExists(ctx, s.ContainerImage) - if err != nil { - s.T().Fatal(err) - } s.container, err = testcontainers.GenericContainer(ctx, req) if err != nil { @@ -258,20 +254,3 @@ func (s *ContainerSuite) TearDownSuite() { s.T().Fatal(err) } } - -func validateImageExists(ctx context.Context, image string) error { - dockerClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - if err != nil { - return fmt.Errorf("failed creating docker client: %w", err) - } - - _, _, err = dockerClient.ImageInspectWithRaw(ctx, image) - if err != nil { - if client.IsErrNotFound(err) { - return fmt.Errorf("a Docker image containing Zeebe must be built and named '%s'", image) - } - - return err - } - return nil -} diff --git a/test/integration_test.go b/test/integration_test.go index 78d00291..1278359f 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -32,7 +32,7 @@ import ( "github.com/stretchr/testify/suite" ) -const dockerImageName = "camunda/zeebe:current-test" +const dockerImageName = "camunda/zeebe:8.6.0-alpha5" type integrationTestSuite struct { *containersuite.ContainerSuite