Skip to content

Commit

Permalink
Merge branch 'master' into feat/sharding-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 19, 2023
2 parents 75a4de4 + ec69211 commit 21960fa
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
import com.netflix.spinnaker.kork.artifacts.artifactstore.ArtifactStoreURIBuilder;
import com.netflix.spinnaker.kork.artifacts.artifactstore.NoopArtifactStoreGetter;
import com.netflix.spinnaker.kork.artifacts.artifactstore.NoopArtifactStoreStorer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInfo;
import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.test.util.ReflectionTestUtils;
import software.amazon.awssdk.services.s3.S3Client;

class S3ArtifactStoreConfigurationTest {
Expand All @@ -41,6 +43,16 @@ void init(TestInfo testInfo) {
System.out.println("--------------- Test " + testInfo.getDisplayName());
}

@AfterEach
void cleanup() {
// Clear ArtifactStore.instance so we don't leave lingering state for other
// tests that assume it's null.
//
// Note that ArtifactStore.setInstance(null) doesn't set instance to null
// if it's already set.
ReflectionTestUtils.setField(ArtifactStore.class, "instance", null);
}

@Test
void testArtifactStoreS3Disabled() {
runner
Expand Down

0 comments on commit 21960fa

Please sign in to comment.