diff --git a/build-logic/jvm/src/main/kotlin/build-logic.testing.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.testing.gradle.kts index c67bc6fa..22bf860c 100644 --- a/build-logic/jvm/src/main/kotlin/build-logic.testing.gradle.kts +++ b/build-logic/jvm/src/main/kotlin/build-logic.testing.gradle.kts @@ -1,6 +1,5 @@ tasks.withType().configureEach { if (project.hasProperty("skipOidc")) { - println("skipOidc: ${project.findProperty("skipOidc")}") systemProperty("sigstore-java.test.skipOidc", project.findProperty("skipOidc")!!) } if (project.hasProperty("org.gradle.jvmargs")) { diff --git a/sigstore-testkit/src/main/kotlin/dev/sigstore/testkit/EnableIfOidcExistsCondition.kt b/sigstore-testkit/src/main/kotlin/dev/sigstore/testkit/EnableIfOidcExistsCondition.kt index dfd7bd5d..0d4b6538 100644 --- a/sigstore-testkit/src/main/kotlin/dev/sigstore/testkit/EnableIfOidcExistsCondition.kt +++ b/sigstore-testkit/src/main/kotlin/dev/sigstore/testkit/EnableIfOidcExistsCondition.kt @@ -32,12 +32,13 @@ class EnableIfOidcExistsCondition : ExecutionCondition { .map { it.provider }.orElse(OidcProviderType.ANY) return when { - provider == OidcProviderType.MANUAL -> - if (System.getenv("CI") == "true") { - disabled("CI environment is present, and the test has been configured to run with MANUAL OIDC only") - } else { - enabled("the test has been configured with MANUAL OIDC, and no CI environment variable is detected") - } + provider == OidcProviderType.MANUAL && + System.getenv("CI") == "true" -> + disabled("CI environment variable is present, and the test has been configured to run with MANUAL OIDC only") + + provider in listOf(OidcProviderType.ANY, OidcProviderType.MANUAL) && + System.getenv("CI") != "true" -> + enabled("the test has been configured with MANUAL OIDC, and no CI environment variable is detected") provider in listOf(OidcProviderType.ANY, OidcProviderType.CI, OidcProviderType.GITHUB) && System.getenv("ACTIONS_ID_TOKEN_REQUEST_URL") != null ->