@@ -20,7 +20,7 @@ func TestBootstrapIntegration_PermissionDenied(t *testing.T) {
2020 mockClient .EnsureNamespaceForbidden = true
2121
2222 ctx := context .Background ()
23- err := mockClient .EnsureNamespace (ctx , "argocd" )
23+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
2424 require .Error (t , err )
2525 assert .Contains (t , err .Error (), "permission denied" )
2626 assert .Contains (t , err .Error (), "cannot create namespace" )
@@ -32,9 +32,10 @@ func TestBootstrapIntegration_SecretCreationFails(t *testing.T) {
3232 mockClient .CreateSecretForbidden = true
3333
3434 ctx := context .Background ()
35- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
35+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
36+ require .NoError (t , err )
3637
37- _ , _ , err : = mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key-data" , false )
38+ _ , _ , err = mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key-data" , false )
3839 require .Error (t , err )
3940 assert .Contains (t , err .Error (), "permission denied" )
4041 assert .Contains (t , err .Error (), "cannot create secrets" )
@@ -74,7 +75,8 @@ func TestBootstrapIntegration_SuccessfulFlow(t *testing.T) {
7475 ctx := context .Background ()
7576
7677 // Step 1: Ensure namespace
77- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
78+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
79+ require .NoError (t , err )
7880 assert .True (t , mockClient .Namespaces ["argocd" ])
7981
8082 // Step 2: Create repo SSH secret
@@ -99,10 +101,11 @@ func TestBootstrapIntegration_DryRun(t *testing.T) {
99101 mockClient := k8s .NewMockClient ()
100102
101103 ctx := context .Background ()
102- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
104+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
105+ require .NoError (t , err )
103106
104107 // Create secret in dry-run mode
105- _ , _ , err : = mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key" , true )
108+ _ , _ , err = mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key" , true )
106109 require .NoError (t , err )
107110
108111 // Secret should not be stored
@@ -115,7 +118,8 @@ func TestBootstrapIntegration_GitCryptKey(t *testing.T) {
115118 mockClient := k8s .NewMockClient ()
116119 ctx := context .Background ()
117120
118- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
121+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
122+ require .NoError (t , err )
119123
120124 keyData := []byte ("mock-git-crypt-key-data" )
121125 created , err := mockClient .CreateGitCryptKeySecret (ctx , keyData )
@@ -135,15 +139,16 @@ func TestBootstrapIntegration_SequentialErrors(t *testing.T) {
135139
136140 // First attempt: permission denied
137141 mockClient .EnsureNamespaceForbidden = true
138- err := mockClient .EnsureNamespace (ctx , "argocd" )
142+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
139143 require .Error (t , err )
140144 assert .Contains (t , err .Error (), "permission denied" )
141145
142146 // Simulate fixing the permission issue
143147 mockClient .EnsureNamespaceForbidden = false
144148
145149 // Retry: should succeed
146- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
150+ _ , err = mockClient .EnsureNamespace (ctx , "argocd" )
151+ require .NoError (t , err )
147152 assert .True (t , mockClient .Namespaces ["argocd" ])
148153}
149154
@@ -165,8 +170,9 @@ func TestBootstrapIntegration_AppOfAppsWithEnv(t *testing.T) {
165170 mockClient := k8s .NewMockClient ()
166171 ctx := context .Background ()
167172
168- require .NoError (t , mockClient .EnsureNamespace (ctx , "argocd" ))
169- _ , _ , err := mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key" , false )
173+ _ , err := mockClient .EnsureNamespace (ctx , "argocd" )
174+ require .NoError (t , err )
175+ _ , _ , err = mockClient .CreateRepoSSHSecret (ctx , "ssh://git@example.com/repo.git" , "key" , false )
170176 require .NoError (t , err )
171177
172178 _ , _ , err = mockClient .ApplyAppOfApps (ctx , "ssh://git@example.com/repo.git" , "main" , tt .env , tt .appPath , false )
0 commit comments