Skip to content

Commit

Permalink
update datastore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nithyatsu committed Sep 8, 2023
1 parent 446b7a9 commit e22a126
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
6 changes: 0 additions & 6 deletions test/functional/datastoresrp/resources/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ func Test_MongoDB_Manual(t *testing.T) {
Type: validation.ContainersResource,
App: name,
},
{
Name: "mdb-us-rte",
Type: validation.HttpRoutesResource,
App: name,
},
{
Name: "mdb-us-db",
Type: validation.MongoDatabasesResource,
Expand All @@ -68,7 +63,6 @@ func Test_MongoDB_Manual(t *testing.T) {
appNamespace: {
validation.NewK8sPodForResource(name, "mdb-us-app-ctnr").ValidateLabels(false),
validation.NewK8sPodForResource(name, "mdb-us-ctnr").ValidateLabels(false),
validation.NewK8sServiceForResource(name, "mdb-us-rte").ValidateLabels(false),
},
},
},
Expand Down
6 changes: 0 additions & 6 deletions test/functional/datastoresrp/resources/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ func Test_SQLDatabase_Manual(t *testing.T) {
Type: validation.SQLDatabasesResource,
App: name,
},
{
Name: "sql-rte",
Type: validation.HttpRoutesResource,
App: name,
},
{
Name: "sql-ctnr",
Type: validation.ContainersResource,
Expand All @@ -71,7 +66,6 @@ func Test_SQLDatabase_Manual(t *testing.T) {
appNamespace: {
validation.NewK8sPodForResource(name, "sql-app-ctnr"),
validation.NewK8sPodForResource(name, "sql-ctnr"),
validation.NewK8sServiceForResource(name, "sql-rte"),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,17 @@ resource db 'Applications.Datastores/sqlDatabases@2022-03-15-privatepreview' = {
properties: {
application: app.id
environment: environment
server: sqlRoute.properties.hostname
server: 'sql-ctnr'
database: 'master'
resourceProvisioning: 'manual'
port: sqlRoute.properties.port
port: sqlPort
username: username
secrets:{
password: password
}
}
}

resource sqlRoute 'Applications.Core/httpRoutes@2022-03-15-privatepreview' = {
name: 'sql-rte'
location: location
properties: {
application: app.id
port: sqlPort
}
}

resource sqlContainer 'Applications.Core/containers@2022-03-15-privatepreview' = {
name: 'sql-ctnr'
location: location
Expand All @@ -98,7 +89,6 @@ resource sqlContainer 'Applications.Core/containers@2022-03-15-privatepreview' =
ports: {
sql: {
containerPort: sqlPort
provides: sqlRoute.id
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,13 @@ resource mongoContainer 'Applications.Core/containers@2022-03-15-privatepreview'
ports: {
mongo: {
containerPort: 27017
provides: mongoRoute.id
}
}
}
connections: {}
}
}

resource mongoRoute 'Applications.Core/httproutes@2022-03-15-privatepreview' = {
name: 'mdb-us-rte'
location: 'global'
properties: {
application: app.id
port: 27017
}
}

resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview' = {
name: 'mdb-us-db'
Expand All @@ -81,7 +72,7 @@ resource mongo 'Applications.Datastores/mongoDatabases@2022-03-15-privatepreview
database: 'mongodb-${app.name}'
username: username
secrets: {
connectionString: 'mongodb://${username}:${password}@${mongoRoute.properties.hostname}:${mongoRoute.properties.port}/mongodb-${app.name}'
connectionString: 'mongodb://${username}:${password}@mdb-us-ctnr:27017/mongodb-${app.name}'
password: password
}
}
Expand Down

0 comments on commit e22a126

Please sign in to comment.