Skip to content

Commit

Permalink
fix(core): only run the secret test when the needed env var is set
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Sep 7, 2023
1 parent 0d32fb0 commit 74b83d8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.inject.Inject;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;

import java.util.concurrent.TimeoutException;

Expand All @@ -24,6 +25,7 @@ public class SecretFunctionTest extends AbstractMemoryRunnerTest {
private SecretService secretService;

@Test
@EnabledIfEnvironmentVariable(named = "SECRET_MY_SECRET", matches = ".*")
void getSecret() throws TimeoutException {
Execution execution = runnerUtils.runOne("io.kestra.tests", "secrets");
assertThat(execution.getTaskRunList().get(0).getOutputs().get("value"), is("secretValue"));
Expand Down

0 comments on commit 74b83d8

Please sign in to comment.