Skip to content

Commit 31774f5

Browse files
authored
CLOUDP-304428: Add test that deletes running ASP instance (#3727)
1 parent be63411 commit 31774f5

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

build/ci/evergreen.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,24 +1245,24 @@ tasks:
12451245
MONGODB_ATLAS_SERVICE: cloud
12461246
E2E_TAGS: atlas,livemigrations
12471247
# Streams commands tests
1248-
# - name: atlas_streams
1249-
# tags: ["e2e","generic","atlas", "assigned_to_jira_team_cloudp_atlas_streams"]
1250-
# must_have_test_results: true
1251-
# depends_on:
1252-
# - name: compile
1253-
# variant: "code_health"
1254-
# patch_optional: true
1255-
# commands:
1256-
# - func: "install gotestsum"
1257-
# - func: "e2e test"
1258-
# vars:
1259-
# MONGODB_ATLAS_ORG_ID: ${atlas_org_id}
1260-
# MONGODB_ATLAS_PROJECT_ID: ${atlas_project_id}
1261-
# MONGODB_ATLAS_PRIVATE_API_KEY: ${atlas_private_api_key}
1262-
# MONGODB_ATLAS_PUBLIC_API_KEY: ${atlas_public_api_key}
1263-
# MONGODB_ATLAS_OPS_MANAGER_URL: ${mcli_ops_manager_url}
1264-
# MONGODB_ATLAS_SERVICE: cloud
1265-
# E2E_TAGS: atlas,streams
1248+
- name: atlas_streams
1249+
tags: ["e2e","generic","atlas", "assigned_to_jira_team_cloudp_atlas_streams"]
1250+
must_have_test_results: true
1251+
depends_on:
1252+
- name: compile
1253+
variant: "code_health"
1254+
patch_optional: true
1255+
commands:
1256+
- func: "install gotestsum"
1257+
- func: "e2e test"
1258+
vars:
1259+
MONGODB_ATLAS_ORG_ID: ${atlas_org_id}
1260+
MONGODB_ATLAS_PROJECT_ID: ${atlas_project_id}
1261+
MONGODB_ATLAS_PRIVATE_API_KEY: ${atlas_private_api_key}
1262+
MONGODB_ATLAS_PUBLIC_API_KEY: ${atlas_public_api_key}
1263+
MONGODB_ATLAS_OPS_MANAGER_URL: ${mcli_ops_manager_url}
1264+
MONGODB_ATLAS_SERVICE: cloud
1265+
E2E_TAGS: atlas,streams
12661266
- name: atlas_streams_with_cluster
12671267
tags: [ "e2e","streams","atlas","assigned_to_jira_team_cloudp_atlas_streams"]
12681268
must_have_test_results: true

test/e2e/atlas/streams_with_clusters_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,22 @@ func TestStreamsWithClusters(t *testing.T) {
105105
a.Equal(connectionName, *connection.Name)
106106
a.Equal("atlasAdmin", *connection.DbRoleToExecute.Role)
107107
})
108+
109+
t.Run("Delete the streams instance", func(_ *testing.T) {
110+
cmd := exec.Command(cliPath,
111+
"streams",
112+
"instance",
113+
"delete",
114+
"--force",
115+
instanceName,
116+
"--projectId",
117+
g.projectID,
118+
)
119+
120+
cmd.Env = os.Environ()
121+
resp, err := e2e.RunAndGetStdOut(cmd)
122+
req.NoError(err, string(resp))
123+
})
108124
}
109125

110126
func generateAtlasConnectionConfigFile(clusterName string) (string, error) {

0 commit comments

Comments
 (0)