Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Sep 7, 2023
1 parent 2de39a7 commit fc5ddf2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion packages/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<root>/tools/sync_test_server/start_local_server.sh`
syncTestUrl=http://localhost:9090
syncTestAppNamePrefix=test-app
Expand All @@ -69,4 +70,3 @@ syncTestLoginPassword=password
# syncTestLoginPublicApiKey=replace-with-value
# synctestLoginPrivateApiKey=replace-with-value
# syncTestClusterName=replace-with-value

27 changes: 0 additions & 27 deletions packages/test-sync/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -284,33 +284,6 @@ kotlin {

// The Device Sync server used by the tests are configured through Gradle properties defined
// in `<root>/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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fc5ddf2

Please sign in to comment.