Skip to content

Commit a70ce2c

Browse files
committed
Add new integration-tests for server
This `integration-tests` directory makes it possible to write Rust code that you can run directly against the generated servers from the protocol test models. This makes it easier to test things like event streams behavior and other specifics that are hard to test with protocol tests alone.
1 parent 5b71235 commit a70ce2c

File tree

8 files changed

+2390
-1
lines changed

8 files changed

+2390
-1
lines changed

codegen-server-test/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ tasks["assemble"].finalizedBy("generateCargoWorkspace", "generateCargoConfigToml
110110
project.registerModifyMtimeTask()
111111
project.registerCargoCommandsTasks(layout.buildDirectory.dir(workingDirUnderBuildDir).get().asFile)
112112

113-
tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString })
113+
tasks.register<Exec>("cargoTestIntegration") {
114+
dependsOn("assemble")
115+
workingDir(projectDir.resolve("integration-tests"))
116+
commandLine("cargo", "test")
117+
}
118+
119+
tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }, "cargoTestIntegration")
114120

115121
tasks["clean"].doFirst { delete("smithy-build.json") }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cargo.lock

0 commit comments

Comments
 (0)