From fc5ddf231f0dfb841866e91a99d5d563aa2d7c41 Mon Sep 17 00:00:00 2001 From: Christian Melchior Date: Thu, 7 Sep 2023 17:47:11 +0200 Subject: [PATCH] Cleanup --- packages/gradle.properties | 2 +- packages/test-sync/build.gradle.kts | 27 ------------------- .../mongodb/common/ProgressListenerTests.kt | 1 - 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/packages/gradle.properties b/packages/gradle.properties index 408fac9c34..184a4422d3 100644 --- a/packages/gradle.properties +++ b/packages/gradle.properties @@ -58,6 +58,7 @@ testRepository=build/m2-buildrepo/ # Must either be `debug` or `debugMinified` testBuildType=debug +# Properties controlling which test server to run sync tests against. Default is a local # test server that has been started by calling `/tools/sync_test_server/start_local_server.sh` syncTestUrl=http://localhost:9090 syncTestAppNamePrefix=test-app @@ -69,4 +70,3 @@ syncTestLoginPassword=password # syncTestLoginPublicApiKey=replace-with-value # synctestLoginPrivateApiKey=replace-with-value # syncTestClusterName=replace-with-value - diff --git a/packages/test-sync/build.gradle.kts b/packages/test-sync/build.gradle.kts index c5bfcf27ff..da8787514c 100644 --- a/packages/test-sync/build.gradle.kts +++ b/packages/test-sync/build.gradle.kts @@ -284,33 +284,6 @@ kotlin { // The Device Sync server used by the tests are configured through Gradle properties defined // in `/packages/gradle.properties` -// - 'syncTest.url` defines the root URL for the App Services server. Default is `http://localhost:9090` -// - 'syncTest.appNamePrefix' is added a differentiator for all apps created by tests. This makes -// it possible for builds in parallel to run against the same test server. Default is `test-app`. -buildkonfig { - packageName = "io.realm.kotlin.test.mongodb" - objectName = "SyncServerConfig" - defaultConfigs { - buildConfigField(Type.STRING, "url", properties["syncTestUrl"]!! as String) - buildConfigField(Type.STRING, "appPrefix", properties["syncTestAppNamePrefix"]!! as String) - if (properties.containsKey("syncTestLoginEmail") && properties.containsKey("syncTestLoginPassword")) { - buildConfigField(Type.STRING, "email", properties["syncTestLoginEmail"]!! as String) - buildConfigField(Type.STRING, "password", properties["syncTestLoginPassword"]!! as String) - } else { - buildConfigField(Type.STRING, "email", "") - buildConfigField(Type.STRING, "password", "") - } - if (properties.containsKey("syncTestLoginPublicApiKey") && properties.containsKey("syncTestLoginPrivateApiKey")) { - buildConfigField(Type.STRING, "publicApiKey", properties["syncTestLoginPublicApiKey"]!! as String) - buildConfigField(Type.STRING, "privateApiKey", properties["syncTestLoginPrivateApiKey"]!! as String) - } else { - buildConfigField(Type.STRING, "publicApiKey", "") - buildConfigField(Type.STRING, "privateApiKey", "") - } - buildConfigField(Type.STRING, "clusterName", properties["syncTestClusterName"] as String? ?: "") - } -} - // - 'syncTestUrl` defines the root URL for the App Services server. Default is `http://localhost:9090` // - 'syncTestAppNamePrefix' is added a differentiator for all apps created by tests. This makes // it possible for builds in parallel to run against the same test server. Default is `test-app`. diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt index 75e56e42eb..eab0c3d6e6 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/ProgressListenerTests.kt @@ -256,7 +256,6 @@ class ProgressListenerTests { @Test fun completesOnClose() = runBlocking { - val app = TestApp(TEST_APP_PARTITION) TestApp("completesOnClose", TEST_APP_PARTITION).use { app -> val user = app.createUserAndLogIn() val realm = Realm.open(createSyncConfig(user))