Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/test/groovy/org/justserve/JustServeSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ class JustServeSpec extends Specification {
String justServeUrl, userEmail

def setupSpec() {
if(System.getenv("TEST_TOKEN") == null) {
throw new IllegalStateException("TEST_TOKEN is NOT set. Define this variable for" +
"" +
" testing.")
}
if (null != System.getenv("JUSTSERVE_TOKEN")) {
throw new IllegalStateException("JUSTSERVE_TOKEN is set. Do not define this variable in testing.")
}
justServeUrl = System.getenv("JUSTSERVE_URL") ?: "https://www.justserve.org"
if (justServeUrl.toLowerCase().contains("dev")) {
userEmail = "userc5f660c0-5c3a-42a8-bbe0-8dad54d00f42@fake.justserve.org"
} else {
userEmail = "jimmy@justserve.org"
}
if (null != System.getenv("JUSTSERVE_TOKEN")) {
throw new IllegalStateException("JUSTSERVE_TOKEN is set. Do not define this variable in testing.")
}
ctx = ApplicationContext.builder()
.environments(Environment.CLI, Environment.TEST)
.properties([
Expand Down
Loading