From dd24f934237de87655485e8329abac3f0de03ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 24 Nov 2025 14:30:29 +0100 Subject: [PATCH] fix(aerospike): set nsup-period to enables TTL expiration --- aerospike/aerospike_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aerospike/aerospike_test.go b/aerospike/aerospike_test.go index 7d906f56..aff9071e 100644 --- a/aerospike/aerospike_test.go +++ b/aerospike/aerospike_test.go @@ -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)