From 3c7499facf5f7e8b7db26b2b31fc7220df7c6beb Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 11 Oct 2023 16:42:29 -0600 Subject: [PATCH] test: mark unit test secrets as not secret There are 2 cases of randomly generated secrets copied into Rook's unit test code that have been flagged by Gitleaks. Add a comment to both cases to help the tool understand that these aren't real production secrets -- just unit test stand-ins. Signed-off-by: Blaine Gardner --- pkg/operator/ceph/object/controller_test.go | 2 +- pkg/operator/ceph/object/user/controller_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/operator/ceph/object/controller_test.go b/pkg/operator/ceph/object/controller_test.go index efdd30353..76f3fcfe9 100644 --- a/pkg/operator/ceph/object/controller_test.go +++ b/pkg/operator/ceph/object/controller_test.go @@ -348,7 +348,7 @@ var mockMultisiteAdminOpsCtxFunc = func(objContext *Context, spec *cephv1.Object return &AdminOpsContext{ Context: *context, AdminOpsUserAccessKey: "EOE7FYCNOBZJ5VFV909G", - AdminOpsUserSecretKey: "qmIqpWm8HxCzmynCrD6U6vKWi4hnDBndOnmxXNsV", + AdminOpsUserSecretKey: "qmIqpWm8HxCzmynCrD6U6vKWi4hnDBndOnmxXNsV", // notsecret AdminOpsClient: adminClient, }, nil } diff --git a/pkg/operator/ceph/object/user/controller_test.go b/pkg/operator/ceph/object/user/controller_test.go index 4094b1a71..498e6a503 100644 --- a/pkg/operator/ceph/object/user/controller_test.go +++ b/pkg/operator/ceph/object/user/controller_test.go @@ -316,7 +316,7 @@ func TestCephObjectStoreUserController(t *testing.T) { return &cephobject.AdminOpsContext{ Context: *context, AdminOpsUserAccessKey: "53S6B9S809NUP19IJ2K3", - AdminOpsUserSecretKey: "1bXPegzsGClvoGAiJdHQD1uOW2sQBLAZM9j9VtXR", + AdminOpsUserSecretKey: "1bXPegzsGClvoGAiJdHQD1uOW2sQBLAZM9j9VtXR", // notsecret AdminOpsClient: adminClient, }, nil }