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

feat: add podman support #253

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
module github.com/spirit-labs/tektite

go 1.21
go 1.22

toolchain go1.22.3
toolchain go1.22.4

//ToDo: remove this when we get a new release > v0.33.0 in testcontainers-go
replace (
github.com/testcontainers/testcontainers-go => github.com/testcontainers/testcontainers-go v0.33.1-0.20240920111606-b823aad932f7
github.com/testcontainers/testcontainers-go/modules/kafka => github.com/testcontainers/testcontainers-go/modules/kafka v0.33.1-0.20240920111606-b823aad932f7
github.com/testcontainers/testcontainers-go/modules/minio => github.com/testcontainers/testcontainers-go/modules/minio v0.33.1-0.20240920111606-b823aad932f7
)

require (
github.com/alecthomas/kong v0.2.17
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -932,14 +932,14 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw=
github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8=
github.com/testcontainers/testcontainers-go v0.33.1-0.20240920111606-b823aad932f7 h1:sTy9AHLkPU75JB3iAnub4a4g1m6b6EJhYeXiefGszJs=
github.com/testcontainers/testcontainers-go v0.33.1-0.20240920111606-b823aad932f7/go.mod h1:rM5A56wRZcJhnk0CRNYGU4CQYjECaGXbTzHB2/R8p2s=
github.com/testcontainers/testcontainers-go/modules/compose v0.31.0 h1:H74o3HisnApIDQx7sWibGzOl/Oo0By8DjyVeUf3qd6I=
github.com/testcontainers/testcontainers-go/modules/compose v0.31.0/go.mod h1:z1JAsvL2/pNFy40yJX0VX9Yk+hzOCIO5DydxBJHBbCY=
github.com/testcontainers/testcontainers-go/modules/kafka v0.31.0 h1:8B1u+sDwYhTUoMI271wPjnCg9mz3dHGLMWpP7YyF7kE=
github.com/testcontainers/testcontainers-go/modules/kafka v0.31.0/go.mod h1:W1+yLUfUl8VLTzvmApP2FBHgCk8I5SKKjDWjxWEc33U=
github.com/testcontainers/testcontainers-go/modules/minio v0.33.0 h1:lHhjYlm0Oh+PfM03NIwCqNg2zSz9VuNTwUKi4MQfYAA=
github.com/testcontainers/testcontainers-go/modules/minio v0.33.0/go.mod h1:3WRFF6lLI3IqXb7lvOx6OpEcH1jgs59mbzZiPTJeEJg=
github.com/testcontainers/testcontainers-go/modules/kafka v0.33.1-0.20240920111606-b823aad932f7 h1:DiYAya7KBT7ZZA3ii5K/3jOmp1w2hsunuenGSofCmwY=
github.com/testcontainers/testcontainers-go/modules/kafka v0.33.1-0.20240920111606-b823aad932f7/go.mod h1:VWhufxbq7OH4Fla2ZhHo3q/daZWzGmqHr+KQLNeEzGY=
github.com/testcontainers/testcontainers-go/modules/minio v0.33.1-0.20240920111606-b823aad932f7 h1:BKBcT9/xqtpfrwVuMGia9eb1xZMQfiqSdrPW/dglgOU=
github.com/testcontainers/testcontainers-go/modules/minio v0.33.1-0.20240920111606-b823aad932f7/go.mod h1:5Oi38nmS66O2MOcFZuCEHG8jYQc2/sJ9PzDfe8gfbq4=
github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8=
github.com/tetratelabs/wazero v1.7.1/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
Expand Down
11 changes: 8 additions & 3 deletions objstore/minio/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ package minio
import (
"context"
"fmt"
"os"
"testing"

miniolib "github.com/minio/minio-go/v7"
"github.com/spirit-labs/tektite/asl/conf"
"github.com/spirit-labs/tektite/objstore"
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go/modules/minio"
"testing"
)

func TestMinioObjStore(t *testing.T) {

// Currently, Podman doesn't support Ryuk
// Raised an issue on testcontainers-go
// https://github.com/testcontainers/testcontainers-go/issues/2781
// ToDo: Remove the below line once the above issue is resolved
os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
ctx := context.Background()

minioContainer, err := minio.Run(ctx, "minio/minio:RELEASE.2024-08-26T15-33-07Z", minio.WithUsername("minioadmin"), minio.WithPassword("minioadmin"))
require.NoError(t, err)

Expand Down
11 changes: 9 additions & 2 deletions testutils/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package testutils
import (
"context"
"fmt"
"os"
"sync"

"github.com/docker/go-connections/nat"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
"sync"
)

type EtcdHolder struct {
Expand All @@ -22,7 +24,7 @@ func (e *EtcdHolder) Stop() {
if !e.started {
return
}
if err := e.container.Stop(context.Background(), nil); err != nil {
if err := e.container.Terminate(context.Background()); err != nil {
panic(err)
}
e.started = false
Expand All @@ -33,6 +35,11 @@ func (e *EtcdHolder) Address() string {
}

func CreateEtcdContainer() (*EtcdHolder, error) {
// Currently, Podman doesn't support Ryuk
// Raised an issue on testcontainers-go
// https://github.com/testcontainers/testcontainers-go/issues/2781
// ToDo: Remove the below line once the above issue is resolved
os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
ctx := context.Background()
req := testcontainers.ContainerRequest{
Image: "gcr.io/etcd-development/etcd:v3.5.10",
Expand Down