Skip to content

Commit

Permalink
Remove the interop tests (#261)
Browse files Browse the repository at this point in the history
They weren't running in CI and haven't been maintained so the other language client no longer even compile cleanly. Given we're not running these tests and they were only basic ping, they aren't providing enough value to justify fixing and maintaining them.
  • Loading branch information
ajsutton authored Dec 20, 2022
1 parent 1e6f17f commit cafa8a0
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 1,408 deletions.
69 changes: 0 additions & 69 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -129,75 +129,6 @@ tasks.test {
// Runtime.getRuntime().availableProcessors().div(2))
}

// Interop Tests
fun findOnPath(executable: String): Boolean {
return System.getenv("PATH").split(File.pathSeparator)
.map { Paths.get(it) }
.any { Files.exists(it.resolve(executable)) }
}
val goOnPath = findOnPath("go")
val nodeOnPath = findOnPath("node")
val rustOnPath = findOnPath("cargo")

val externalsDir = File(sourceSets.test.get().resources.sourceDirectories.singleFile, "../external")
val goPingServer = File(externalsDir, "go/ping-server")
val goPingClient = File(externalsDir, "go/ping-client")
val jsPinger = File(externalsDir, "js/pinger")
val rustPingServer = File(externalsDir, "rust/ping-server")
val rustPingClient = File(externalsDir, "rust/ping-client")

val goTargets = listOf(goPingServer, goPingClient).map { target ->
val name = "go-build-${target.name}"
task(name, Exec::class) {
workingDir = target
commandLine = "go build".split(" ")
}
name
}

val rustTargets = listOf(rustPingServer, rustPingClient).map { target ->
val name = "rust-build-${target.name}"
task(name, Exec::class) {
workingDir = target
commandLine = "cargo build".split(" ")
}
name
}

task("npm-install-pinger", Exec::class) {
workingDir = jsPinger
commandLine = "npm install".split(" ")
}

task("interopTest", Test::class) {
group = "Verification"
description = "Runs the interoperation tests."

val dependencies = ArrayList<String>()
if (goOnPath) dependencies.addAll(goTargets)
if (nodeOnPath) dependencies.add("npm-install-pinger")
if (rustOnPath) dependencies.addAll(rustTargets)
dependsOn(dependencies)

useJUnitPlatform {
includeTags("interop")
}

testLogging {
events("PASSED", "FAILED", "SKIPPED")
}

environment("ENABLE_JS_INTEROP", nodeOnPath)
environment("JS_PINGER", jsPinger.toString())
environment("ENABLE_GO_INTEROP", goOnPath)
environment("GO_PING_SERVER", goPingServer.toString())
environment("GO_PING_CLIENT", goPingClient.toString())
environment("ENABLE_RUST_INTEROP", rustOnPath)
environment("RUST_PING_SERVER", rustPingServer.toString())
environment("RUST_PING_CLIENT", rustPingClient.toString())
}
// End Interop Tests

kotlinter {
disabledRules = arrayOf("no-wildcard-imports")
}
Expand Down
4 changes: 0 additions & 4 deletions src/test/external/go/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions src/test/external/go/ping-client/go.mod

This file was deleted.

78 changes: 0 additions & 78 deletions src/test/external/go/ping-client/main.go

This file was deleted.

12 changes: 0 additions & 12 deletions src/test/external/go/ping-server/go.mod

This file was deleted.

95 changes: 0 additions & 95 deletions src/test/external/go/ping-server/main.go

This file was deleted.

53 changes: 0 additions & 53 deletions src/test/external/js/pinger/lib/peer-node.js

This file was deleted.

41 changes: 0 additions & 41 deletions src/test/external/js/pinger/lib/ping-client.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/external/js/pinger/lib/ping-server.js

This file was deleted.

Loading

0 comments on commit cafa8a0

Please sign in to comment.