Skip to content

Commit

Permalink
chore(dependencies): Autobump korkVersion (#1036)
Browse files Browse the repository at this point in the history
* chore(dependencies): Autobump korkVersion

* fix(manifests/test): keep up with SpinnakerNetworkException constructor changes

from spinnaker/kork#1110

---------

Co-authored-by: root <root@2f91e8016c3c>
Co-authored-by: David Byron <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2023
1 parent c2d210f commit e8ffd89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
korkVersion=7.195.0
korkVersion=7.196.0
org.gradle.parallel=true
spinnakerGradleVersion=8.31.0
targetJava11=true
Expand Down
1 change: 1 addition & 0 deletions rosco-manifests/rosco-manifests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {

implementation "com.squareup.retrofit2:retrofit"
testImplementation "org.assertj:assertj-core"
testImplementation "com.squareup.okhttp3:okhttp"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.mockito:mockito-core"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import okhttp3.Request;
import okhttp3.ResponseBody;
import org.junit.jupiter.api.Test;
import retrofit2.Call;
Expand Down Expand Up @@ -58,11 +59,12 @@ public void downloadsArtifactContent() throws IOException {
@Test
public void retries() throws IOException {
ArtifactDownloaderImpl artifactDownloader = new ArtifactDownloaderImpl(clouddriverService);
Request request = new Request.Builder().url("http://some-url").build();
String testContent = "abcdefg";
try (ArtifactDownloaderImplTest.AutoDeletingFile file = new AutoDeletingFile()) {
when(clouddriverService.fetchArtifact(testArtifact)).thenReturn(mockCall);
when(mockCall.execute())
.thenThrow(new SpinnakerNetworkException(new IOException("timeout")))
.thenThrow(new SpinnakerNetworkException(new IOException("timeout"), request))
.thenReturn(successfulResponse(testContent));
artifactDownloader.downloadArtifactToFile(testArtifact, file.path);

Expand Down

0 comments on commit e8ffd89

Please sign in to comment.