Configure weed to use s3_kms.json for SSE-KMS tests; set OpenBao env vars

This commit is contained in:
Chris Lu committed 2025-12-24 20:04:41 -08:00
1 parent 1af25ceb7d
commit d0d2b021d9
1 file changed
+8
+8
View File
@@ -24,6 +24,14 @@ func TestMain(m *testing.M) {
config.AccessKey = "some_access_key1"
config.SecretKey = "some_secret_key1"
// If running KMS tests, point the server at the KMS-aware S3 config
// located in this directory (s3_kms.json).
config.S3Config = "s3_kms.json"
// Ensure OpenBao env vars are available for any helper scripts
os.Setenv("OPENBAO_ADDR", "http://127.0.0.1:8200")
os.Setenv("OPENBAO_TOKEN", "root-token-for-testing")
var err error
testServer, err = testutil.StartServer(config)
if err != nil {