Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use official pulsar container for arm64 #48

Merged
merged 1 commit into from
May 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions testhelper/docker/resource/pulsar.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package resource
import (
"bytes"
"fmt"
"runtime"

"github.com/ory/dockertest/v3"
"github.com/rudderlabs/rudder-go-kit/testhelper/docker/resource/pulsar"
Expand All @@ -16,22 +15,16 @@ type PulsarResource struct {

func SetupPulsar(pool *dockertest.Pool, d cleaner, opts ...pulsar.Opt) (*PulsarResource, error) {
c := &pulsar.Config{
Tag: "2.11.0",
Tag: "3.0.0",
}
for _, opt := range opts {
opt(c)
}
cmd := []string{"bin/pulsar", "standalone"}

repository := "apachepulsar/pulsar"
tag := c.Tag
if runtime.GOARCH == "arm64" { // TODO: use original image when multi-arch images are supported by pulsar
repository = "atzoum/pulsar"
tag = "latest"
}
pulsarContainer, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: repository,
Tag: tag,
Repository: "apachepulsar/pulsar",
Tag: c.Tag,
Env: []string{},
ExposedPorts: []string{"6650", "8080"},
Cmd: cmd,
Expand Down