Skip to content

Commit

Permalink
CLOUDP-211696 Skip serverless on gov
Browse files Browse the repository at this point in the history
  • Loading branch information
fmenezes committed Nov 27, 2023
1 parent 8e9b7de commit 964070f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
13 changes: 11 additions & 2 deletions test/e2e/atlas/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ func TestCleanup(t *testing.T) {
cliPath, err := e2e.AtlasCLIBin()
req.NoError(err)

deleteOrgInvitations(t, cliPath)
deleteOrgTeams(t, cliPath)
t.Run("trying to org invitations", func(t *testing.T) {
t.Parallel()
deleteOrgInvitations(t, cliPath)
})
t.Run("trying to org teams", func(t *testing.T) {
t.Parallel()
deleteOrgTeams(t, cliPath)
})

cmd := exec.Command(cliPath,
projectEntity,
Expand Down Expand Up @@ -85,6 +91,9 @@ func TestCleanup(t *testing.T) {
deleteAllDataFederations(t, cliPath, projectID)
})
t.Run("delete all serverless instances", func(t *testing.T) {
if IsGov() {
t.Skip()
}
t.Parallel()
deleteAllServerlessInstances(t, cliPath, projectID)
})
Expand Down
16 changes: 8 additions & 8 deletions test/e2e/atlas/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func deleteServerlessInstanceForProject(t *testing.T, cliPath, projectID, cluste
deleteCmd := exec.Command(cliPath, args...)
deleteCmd.Env = os.Environ()
resp, err := deleteCmd.CombinedOutput()
require.NoError(t, err, resp)
require.NoError(t, err, string(resp))

_ = watchServerlessInstanceForProject(projectID, clusterName)
}
Expand Down Expand Up @@ -657,7 +657,7 @@ func listClustersForProject(t *testing.T, cliPath, projectID string) atlasv2.Pag
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
t.Log(string(resp))
require.NoError(t, err)
require.NoError(t, err, string(resp))
var clusters atlasv2.PaginatedAdvancedClusterDescription
require.NoError(t, json.Unmarshal(resp, &clusters))
return clusters
Expand Down Expand Up @@ -690,7 +690,7 @@ func deleteDatapipelinesForProject(t *testing.T, cliPath, projectID string) {
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
t.Log(string(resp))
require.NoError(t, err)
require.NoError(t, err, string(resp))
var pipelines []atlasv2.DataLakeIngestionPipeline
require.NoError(t, json.Unmarshal(resp, &pipelines))
for _, p := range pipelines {
Expand All @@ -713,7 +713,7 @@ func deleteAllNetworkPeers(t *testing.T, cliPath, projectID, provider string) {
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
t.Log("available network peers", string(resp))
require.NoError(t, err)
require.NoError(t, err, string(resp))
var networkPeers []atlasv2.BaseNetworkPeeringConnectionSettings
err = json.Unmarshal(resp, &networkPeers)
require.NoError(t, err)
Expand Down Expand Up @@ -771,7 +771,7 @@ func listPrivateEndpointsByProject(t *testing.T, cliPath, projectID, provider st
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
t.Log(string(resp))
require.NoError(t, err)
require.NoError(t, err, string(resp))
var privateEndpoints []atlasv2.EndpointService
err = json.Unmarshal(resp, &privateEndpoints)
require.NoError(t, err)
Expand Down Expand Up @@ -892,7 +892,7 @@ func listDataFederationsByProject(t *testing.T, cliPath, projectID string) []atl
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
t.Log("available datafederations", string(resp))
require.NoError(t, err)
require.NoError(t, err, string(resp))

var dataFederations []atlasv2.DataLakeTenant
err = json.Unmarshal(resp, &dataFederations)
Expand All @@ -911,7 +911,7 @@ func listServerlessByProject(t *testing.T, cliPath, projectID string) *atlasv2.P
"-o=json")
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
require.NoError(t, err)
require.NoError(t, err, string(resp))

var serverlessInstances *atlasv2.PaginatedServerlessInstanceDescription
err = json.Unmarshal(resp, &serverlessInstances)
Expand Down Expand Up @@ -961,7 +961,7 @@ func deleteDataFederationForProject(t *testing.T, cliPath, projectID, dataFedNam
"--force")
cmd.Env = os.Environ()
resp, err := cmd.CombinedOutput()
require.NoError(t, err, resp)
require.NoError(t, err, string(resp))
}

func ensureCluster(t *testing.T, cluster *atlasv2.AdvancedClusterDescription, clusterName, version string, diskSizeGB float64, terminationProtection bool) {
Expand Down

0 comments on commit 964070f

Please sign in to comment.