Manually manage GCP service accounts

This commit is contained in:
katexochen 2022-08-23 17:49:55 +02:00 committed by Paul Meyer
parent f9c70d5c5a
commit e761c9bf97
19 changed files with 186 additions and 555 deletions

View file

@ -29,7 +29,6 @@ func TestTerminator(t *testing.T) {
GCPControlPlaneInstanceTemplate: "template",
GCPNetwork: "network",
GCPFirewalls: []string{"a", "b", "c"},
GCPServiceAccount: "service-account@project.iam.gserviceaccount.com",
}
}
someAzureState := func() state.ConstellationState {
@ -80,11 +79,6 @@ func TestTerminator(t *testing.T) {
state: someGCPState(),
wantErr: true,
},
"gcp terminateServiceAccount error": {
gcpclient: &stubGcpClient{terminateServiceAccountErr: someErr},
state: someGCPState(),
wantErr: true,
},
"azure": {
azureclient: &stubAzureClient{},
state: someAzureState(),
@ -135,7 +129,6 @@ func TestTerminator(t *testing.T) {
assert.True(cl.terminateFirewallCalled)
assert.True(cl.terminateInstancesCalled)
assert.True(cl.terminateVPCsCalled)
assert.True(cl.terminateServiceAccountCalled)
assert.True(cl.closeCalled)
case cloudprovider.Azure:
cl := tc.azureclient.(*stubAzureClient)