fix(aerospike): set nsup-period to enables TTL expiration

This commit is contained in:
Manuel de la Peña
2025-11-24 14:30:29 +01:00
parent 5e52e55285
commit dd24f93423

View File

@@ -9,6 +9,7 @@ import (
"github.com/aerospike/aerospike-client-go/v8"
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"
tcexec "github.com/testcontainers/testcontainers-go/exec"
tcaerospike "github.com/testcontainers/testcontainers-go/modules/aerospike"
)
@@ -35,7 +36,13 @@ func startAerospikeContainer(t testing.TB, ctx context.Context) testcontainers.C
}
// Start container
ctr, err := tcaerospike.Run(ctx, image)
ctr, err := tcaerospike.Run(ctx, image,
testcontainers.WithStartupCommand(
testcontainers.NewRawCommand([]string{
"asinfo", "-v", "set-config:context=namespace;id=" + aerospikeNamespace + ";nsup-period=120",
}, tcexec.Multiplexed()),
),
)
testcontainers.CleanupContainer(t, ctr)
require.NoError(t, err)