Skip to content

Commit 82ddadf

Browse files
committed
fix
1 parent 7cf9afc commit 82ddadf

9 files changed

+44
-4
lines changed

test/e2e/atlas_e2e_test_generator_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (g *atlasE2ETestGenerator) generateProject(prefix string) {
9393
g.t.Fatal("projectID not created")
9494
}
9595

96-
if g.skipCleanup() {
96+
if skipCleanup() {
9797
return
9898
}
9999

@@ -117,7 +117,7 @@ func (g *atlasE2ETestGenerator) generateFlexCluster() {
117117
}
118118
g.t.Logf("flexClusterName=%s", g.clusterName)
119119

120-
if g.skipCleanup() {
120+
if skipCleanup() {
121121
return
122122
}
123123

@@ -155,7 +155,7 @@ func (g *atlasE2ETestGenerator) generateCluster() {
155155
}
156156
g.t.Logf("clusterName=%s", g.clusterName)
157157

158-
if g.skipCleanup() {
158+
if skipCleanup() {
159159
return
160160
}
161161

@@ -274,7 +274,7 @@ func (g *atlasE2ETestGenerator) runCommand(args ...string) ([]byte, error) {
274274
return RunAndGetStdOut(cmd)
275275
}
276276

277-
func (*atlasE2ETestGenerator) skipCleanup() bool {
277+
func skipCleanup() bool {
278278
return isTrue(os.Getenv("E2E_SKIP_CLEANUP"))
279279
}
280280

test/e2e/backup_export_jobs_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ func TestExportJobs(t *testing.T) {
219219
require.NoError(t, err, string(resp))
220220
})
221221

222+
if skipCleanup() {
223+
return
224+
}
225+
222226
t.Run("Watch snapshot deletion", func(t *testing.T) {
223227
cmd := exec.Command(cliPath,
224228
backupsEntity,

test/e2e/backup_restores_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ func TestRestores(t *testing.T) {
216216
require.NoError(t, err, string(resp))
217217
})
218218

219+
if skipCleanup() {
220+
return
221+
}
222+
219223
t.Run("Watch snapshot deletion", func(t *testing.T) {
220224
cmd := exec.Command(cliPath,
221225
backupsEntity,

test/e2e/backup_snapshot_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ func TestSnapshots(t *testing.T) {
147147
require.NoError(t, err, string(resp))
148148
})
149149

150+
if skipCleanup() {
151+
return
152+
}
153+
150154
t.Run("Watch deletion", func(t *testing.T) {
151155
cmd := exec.Command(cliPath,
152156
backupsEntity,

test/e2e/clusters_file_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ func TestClustersFile(t *testing.T) {
181181
assert.Equal(t, expected, string(resp))
182182
})
183183

184+
if skipCleanup() {
185+
return
186+
}
187+
184188
t.Run("Watch deletion", func(t *testing.T) {
185189
cmd := exec.Command(cliPath,
186190
clustersEntity,

test/e2e/clusters_m0_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ func TestClustersM0Flags(t *testing.T) {
113113
a.Equal(expected, string(resp))
114114
})
115115

116+
if skipCleanup() {
117+
return
118+
}
119+
116120
t.Run("Watch", func(t *testing.T) {
117121
cmd := exec.Command(cliPath,
118122
clustersEntity,

test/e2e/clusters_sharded_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ func TestShardedCluster(t *testing.T) {
8282
assert.Equal(t, expected, string(resp))
8383
})
8484

85+
if skipCleanup() {
86+
return
87+
}
88+
8589
t.Run("Watch deletion", func(t *testing.T) {
8690
cmd := exec.Command(cliPath,
8791
clustersEntity,

test/e2e/private_endpoint_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ func TestPrivateEndpointsAWS(t *testing.T) {
133133
assert.Equal(t, expected, string(resp))
134134
})
135135

136+
if skipCleanup() {
137+
return
138+
}
139+
136140
t.Run("Watch", func(t *testing.T) {
137141
cmd := exec.Command(cliPath,
138142
privateEndpointsEntity,
@@ -255,6 +259,10 @@ func TestPrivateEndpointsAzure(t *testing.T) {
255259
assert.Equal(t, expected, string(resp))
256260
})
257261

262+
if skipCleanup() {
263+
return
264+
}
265+
258266
t.Run("Watch", func(t *testing.T) {
259267
cmd := exec.Command(cliPath,
260268
privateEndpointsEntity,
@@ -381,6 +389,10 @@ func TestPrivateEndpointsGCP(t *testing.T) {
381389
assert.Equal(t, expected, string(resp))
382390
})
383391

392+
if skipCleanup() {
393+
return
394+
}
395+
384396
t.Run("Watch", func(t *testing.T) {
385397
cmd := exec.Command(cliPath,
386398
privateEndpointsEntity,

test/e2e/serverless_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ func TestServerless(t *testing.T) {
151151
a.Equal(expected, string(resp))
152152
})
153153

154+
if skipCleanup() {
155+
return
156+
}
157+
154158
t.Run("Watch deletion", func(t *testing.T) {
155159
cmd := exec.Command(cliPath,
156160
serverlessEntity,

0 commit comments

Comments
 (0)