From e22a126f9a45b4f1c81b6c7c38b65dc20500438d Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Fri, 8 Sep 2023 10:40:24 -0700 Subject: [PATCH] update datastore tests --- .../datastoresrp/resources/mongodb_test.go | 6 ------ test/functional/datastoresrp/resources/sql_test.go | 6 ------ .../datastoresrp-resources-sqldb-manual.bicep | 14 ++------------ .../testdata/datastoresrp-rs-mongodb-manual.bicep | 11 +---------- 4 files changed, 3 insertions(+), 34 deletions(-) diff --git a/test/functional/datastoresrp/resources/mongodb_test.go b/test/functional/datastoresrp/resources/mongodb_test.go index f46369ad1ed..a4144dbe0bf 100644 --- a/test/functional/datastoresrp/resources/mongodb_test.go +++ b/test/functional/datastoresrp/resources/mongodb_test.go @@ -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, @@ -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), }, }, }, diff --git a/test/functional/datastoresrp/resources/sql_test.go b/test/functional/datastoresrp/resources/sql_test.go index 1f93e3e40be..57e628107ee 100644 --- a/test/functional/datastoresrp/resources/sql_test.go +++ b/test/functional/datastoresrp/resources/sql_test.go @@ -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, @@ -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"), }, }, }, diff --git a/test/functional/datastoresrp/resources/testdata/datastoresrp-resources-sqldb-manual.bicep b/test/functional/datastoresrp/resources/testdata/datastoresrp-resources-sqldb-manual.bicep index a5450a4ccec..bc1f2fdf186 100644 --- a/test/functional/datastoresrp/resources/testdata/datastoresrp-resources-sqldb-manual.bicep +++ b/test/functional/datastoresrp/resources/testdata/datastoresrp-resources-sqldb-manual.bicep @@ -63,10 +63,10 @@ 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 @@ -74,15 +74,6 @@ resource db 'Applications.Datastores/sqlDatabases@2022-03-15-privatepreview' = { } } -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 @@ -98,7 +89,6 @@ resource sqlContainer 'Applications.Core/containers@2022-03-15-privatepreview' = ports: { sql: { containerPort: sqlPort - provides: sqlRoute.id } } } diff --git a/test/functional/datastoresrp/resources/testdata/datastoresrp-rs-mongodb-manual.bicep b/test/functional/datastoresrp/resources/testdata/datastoresrp-rs-mongodb-manual.bicep index 3966151e2a2..80668b6cc72 100644 --- a/test/functional/datastoresrp/resources/testdata/datastoresrp-rs-mongodb-manual.bicep +++ b/test/functional/datastoresrp/resources/testdata/datastoresrp-rs-mongodb-manual.bicep @@ -52,7 +52,6 @@ resource mongoContainer 'Applications.Core/containers@2022-03-15-privatepreview' ports: { mongo: { containerPort: 27017 - provides: mongoRoute.id } } } @@ -60,14 +59,6 @@ resource mongoContainer 'Applications.Core/containers@2022-03-15-privatepreview' } } -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' @@ -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 } }