Skip to content

Commit e44b605

Browse files
authored
test: Fixes previously skipped test TestMigGenericAuditing_basic (#3314)
1 parent 4a2b5fa commit e44b605

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

internal/service/auditing/resource_auditing_migration_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ import (
1111
func TestMigGenericAuditing_basic(t *testing.T) {
1212
mig.SkipIfVersionBelow(t, "1.34.0") // Version where JSON comparison in audit_filter field in mongodbatlas_auditing was fixed
1313
var (
14-
projectID = acc.ProjectIDExecution(t)
15-
auditFilter = "{ 'atype': 'authenticate', 'param': { 'user': 'auditAdmin', 'db': 'admin', 'mechanism': 'SCRAM-SHA-1' }}"
16-
config = configBasic(projectID, auditFilter, true, true)
14+
projectID = acc.ProjectIDExecution(t)
15+
config = configBasic(projectID, auditFilter, true, true)
1716
)
1817

1918
// Serial so it doesn't conflict with TestAccGenericAuditing_basic

internal/service/auditing/resource_auditing_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ const (
1515
resourceName = "mongodbatlas_auditing.test"
1616
dataSourceName = "data.mongodbatlas_auditing.test"
1717
emptyAuditFilter = "{}"
18+
auditFilter = `{
19+
"param": {
20+
"mechanism": "SCRAM-SHA-1",
21+
"db": "admin",
22+
"user": "auditAdmin"
23+
},
24+
"atype": "authenticate"
25+
}`
1826
)
1927

2028
func TestAccGenericAuditing_basic(t *testing.T) {
2129
var (
22-
projectID = acc.ProjectIDExecution(t)
23-
auditFilter = `{
24-
"param": {
25-
"mechanism": "SCRAM-SHA-1",
26-
"db": "admin",
27-
"user": "auditAdmin"
28-
},
29-
"atype": "authenticate"
30-
}`
30+
projectID = acc.ProjectIDExecution(t)
3131
)
3232

3333
// Serial so it doesn't conflict with TestMigGenericAuditing_basic

0 commit comments

Comments
 (0)