Skip to content

Commit

Permalink
test: use zeebe 8.6.0-alpha5 for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
megglos committed Sep 9, 2024
1 parent 8a1bdc6 commit 7b8994a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion cmd/zbctl/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
23 changes: 1 addition & 22 deletions internal/containersuite/containerSuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b8994a

Please sign in to comment.