Skip to content

Commit

Permalink
Set warnings & fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Nov 7, 2022
1 parent e61a73c commit d17604c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ private fun <T, C : CodegenContext> codegenIntegrationTest(
}
buildPlugin.executeWithDecorator(ctx, codegenDecorator, *additionalDecorators.toTypedArray())
ctx.fileManifest.printGeneratedFiles()
"cargo test".runCommand(testDir)
"cargo test".runCommand(testDir, environment = mapOf("RUSTFLAGS" to "-D warnings"))
return testDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package software.amazon.smithy.rust.codegen.client.smithy.generators

import org.junit.jupiter.api.Test
import software.amazon.smithy.rust.codegen.client.testutil.clientIntegrationTest
import software.amazon.smithy.rust.codegen.core.rustlang.Attribute
import software.amazon.smithy.rust.codegen.core.rustlang.rust
import software.amazon.smithy.rust.codegen.core.testutil.asSmithyModel
import software.amazon.smithy.rust.codegen.core.testutil.integrationTest
Expand Down Expand Up @@ -70,6 +71,7 @@ internal class PaginatorGeneratorTest {
fun `generate paginators that compile`() {
clientIntegrationTest(model) { clientCodegenContext, rustCrate ->
rustCrate.integrationTest("paginators_generated") {
Attribute.Custom("allow(unused_imports)").render(this)
rust("use ${clientCodegenContext.moduleUseName()}::paginator::PaginatedListPaginator;")
}
}
Expand Down

0 comments on commit d17604c

Please sign in to comment.