Skip to content

Commit

Permalink
Ignore dogfooding env variable on dev machine in test (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-knize-sonarsource authored Dec 24, 2024
1 parent 07d22bc commit efcc93f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.concurrent.ExecutionException;
import mediumtest.fixtures.SonarLintTestRpcServer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import uk.org.webcompere.systemstubs.environment.EnvironmentVariables;
Expand All @@ -39,6 +40,12 @@ class DogfoodingRpcServiceMediumTests {
EnvironmentVariables environmentVariables;
private SonarLintTestRpcServer backend;

@BeforeEach
void setUp() {
// this is to ignore env variable on dev machine in dogfooding mode and have green tests locally
environmentVariables.remove(SONARSOURCE_DOGFOODING_ENV_VAR_KEY);
}

@AfterEach
void stop() throws ExecutionException, InterruptedException {
if (backend != null) {
Expand Down

0 comments on commit efcc93f

Please sign in to comment.