Skip to content

Commit

Permalink
Update some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juniocezar committed Jan 30, 2024
1 parent 982edc7 commit 26ce92e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cyral/internal/repository/resource_cyral_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ var (
MongoDBSettings: &repository.MongoDBSettings{
ReplicaSetName: "some-replica-set",
ServerType: repository.ReplicaSet,
Flavor: "mongodb",
},
}

Expand All @@ -136,6 +137,7 @@ var (
ReplicaSetName: "myReplicaSet",
ServerType: "replicaset",
SRVRecordName: "mySRVRecord",
Flavor: "documentdb",
},
}
)
Expand Down Expand Up @@ -236,6 +238,13 @@ func repoCheckFuctions(repo repository.RepoInfo, resName string) resource.TestCh
repo.MongoDBSettings.ReplicaSetName),
}...)
}
if repo.MongoDBSettings.Flavor != "" {
checkFuncs = append(checkFuncs, []resource.TestCheckFunc{
resource.TestCheckResourceAttr(resourceFullName,
"mongodb_settings.0.flavor",
repo.MongoDBSettings.Flavor),
}...)
}
checkFuncs = append(checkFuncs, []resource.TestCheckFunc{
resource.TestCheckResourceAttr(resourceFullName,
"mongodb_settings.0.server_type",
Expand Down

0 comments on commit 26ce92e

Please sign in to comment.