Skip to content

Commit

Permalink
refactor(tests): convert junit4 based testcases to junit5 and clean u…
Browse files Browse the repository at this point in the history
…p in rosco (#1001)

Before refactor, total test cases executed were 275.
After refactor, total test cases executed are 275.
  • Loading branch information
j-sandy committed Jul 10, 2023
1 parent 977040e commit 08ca6f3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion rosco-manifests/rosco-manifests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dependencies {
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.platform:junit-platform-runner"
testImplementation "org.mockito:mockito-core"
testImplementation "org.spockframework:spock-core"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@
import java.nio.file.Path;
import okhttp3.ResponseBody;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import retrofit2.Call;
import retrofit2.Response;

@RunWith(JUnitPlatform.class)
final class ArtifactDownloaderImplTest {
private final ClouddriverService clouddriverService = mock(ClouddriverService.class);
private final Call mockCall = mock(Call.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;

@RunWith(JUnitPlatform.class)
final class BakeManifestEnvironmentTest {
@Test
void rejectsInvalidPaths() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
import java.io.InputStream;
import java.util.Base64;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;

@RunWith(JUnitPlatform.class)
public class CloudFoundryBakeManifestServiceTest {

private ArtifactDownloader artifactDownloader = mock(ArtifactDownloader.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import static com.netflix.spinnaker.rosco.manifests.ManifestTestUtils.makeSpinnakerHttpException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -60,11 +60,8 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import org.springframework.http.HttpStatus;

@RunWith(JUnitPlatform.class)
final class HelmTemplateUtilsTest {

private ArtifactDownloader artifactDownloader;
Expand Down

0 comments on commit 08ca6f3

Please sign in to comment.