Skip to content

Commit

Permalink
add a test for #5455
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Jan 29, 2024
1 parent dc34c4b commit 71e1b51
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,22 @@ class ConfigurationCacheTests {
)
assert(result.output.contains("Reusing configuration cache."))
}

@Test
fun schemaCanBeRenamed() = withTestProject("configuration-cache2") { dir ->
TestUtils.executeGradle(
dir,
"--configuration-cache",
"generateApolloSources"
)

dir.resolve("src/main/graphql/schema.graphqls")
.renameTo(dir.resolve("src/main/graphql/schema2.graphqls"))
val result = TestUtils.executeGradle(
dir,
"--configuration-cache",
"generateApolloSources",
)
assert(result.output.contains("Reusing configuration cache."))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.apollo)
}

apollo {
service("service") {
packageName.set("com.example")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apply(from = "../../../../gradle/test.settings.gradle.kts")

include(":root", ":leaf")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
query GetRandom {
random
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type Query {
random: String
}

0 comments on commit 71e1b51

Please sign in to comment.