From 9a02b4d896d76ba35511ca401e21c2ae3703caf4 Mon Sep 17 00:00:00 2001 From: Kiran Godishala <53332225+kirangodishala@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:55:18 +0530 Subject: [PATCH] refactor(retrofit): remove all com.squareup.okhttp dependencies (#1286) --- .../igor-monitor-artifactory.gradle | 2 +- .../ArtifactoryBuildMonitorSpec.groovy | 4 ++-- igor-monitor-travis/igor-monitor-travis.gradle | 2 +- .../igor/travis/client/TravisClientSpec.groovy | 6 +++--- igor-web/igor-web.gradle | 5 +---- .../igor/config/BitBucketConfig.groovy | 2 +- .../spinnaker/igor/config/StashConfig.groovy | 2 +- .../config/auth/AuthRequestInterceptor.groovy | 2 +- .../scm/bitbucket/client/BitBucketMaster.groovy | 2 +- .../igor/build/BuildControllerSpec.groovy | 2 +- .../igor/build/InfoControllerSpec.groovy | 6 +++--- .../concourse/client/ConcourseClientSpec.groovy | 17 ++++------------- .../gitlabci/client/GitlabCiClientSpec.groovy | 4 ++-- .../jenkins/client/JenkinsClientSpec.groovy | 6 +++--- .../jenkins/service/JenkinsServiceSpec.groovy | 7 +++---- .../bitbucket/client/BitBucketClientSpec.groovy | 6 +++--- .../scm/github/client/GitHubClientSpec.groovy | 6 +++--- .../scm/gitlab/client/GitLabClientSpec.groovy | 8 +++----- .../scm/stash/client/StashClientSpec.groovy | 6 +++--- .../igor/wercker/WerckerClientSpec.groovy | 4 ++-- .../concourse/ConcourseBuildMonitorTest.java | 4 ++-- 21 files changed, 44 insertions(+), 59 deletions(-) diff --git a/igor-monitor-artifactory/igor-monitor-artifactory.gradle b/igor-monitor-artifactory/igor-monitor-artifactory.gradle index 2f51684f6..1268c49d5 100644 --- a/igor-monitor-artifactory/igor-monitor-artifactory.gradle +++ b/igor-monitor-artifactory/igor-monitor-artifactory.gradle @@ -37,5 +37,5 @@ dependencies { // TODO(rz): Get rid of this dependency! implementation "com.squareup.retrofit:retrofit" - testImplementation "com.squareup.okhttp:mockwebserver" + testImplementation "com.squareup.okhttp3:mockwebserver" } diff --git a/igor-monitor-artifactory/src/test/groovy/com/netflix/spinnaker/igor/artifactory/ArtifactoryBuildMonitorSpec.groovy b/igor-monitor-artifactory/src/test/groovy/com/netflix/spinnaker/igor/artifactory/ArtifactoryBuildMonitorSpec.groovy index 9b9b38cc3..aecd72406 100644 --- a/igor-monitor-artifactory/src/test/groovy/com/netflix/spinnaker/igor/artifactory/ArtifactoryBuildMonitorSpec.groovy +++ b/igor-monitor-artifactory/src/test/groovy/com/netflix/spinnaker/igor/artifactory/ArtifactoryBuildMonitorSpec.groovy @@ -25,8 +25,8 @@ import com.netflix.spinnaker.igor.history.EchoService import com.netflix.spinnaker.igor.polling.LockService import com.netflix.spinnaker.kork.discovery.DiscoveryStatusListener import com.netflix.spinnaker.kork.dynamicconfig.DynamicConfigService -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import org.springframework.scheduling.TaskScheduler import spock.lang.Specification diff --git a/igor-monitor-travis/igor-monitor-travis.gradle b/igor-monitor-travis/igor-monitor-travis.gradle index 236a3f830..a2658b98f 100644 --- a/igor-monitor-travis/igor-monitor-travis.gradle +++ b/igor-monitor-travis/igor-monitor-travis.gradle @@ -35,5 +35,5 @@ dependencies { implementation "javax.validation:validation-api" implementation "javax.xml.bind:jaxb-api" - testImplementation "com.squareup.okhttp:mockwebserver" + testImplementation "com.squareup.okhttp3:mockwebserver" } diff --git a/igor-monitor-travis/src/test/groovy/com/netflix/spinnaker/igor/travis/client/TravisClientSpec.groovy b/igor-monitor-travis/src/test/groovy/com/netflix/spinnaker/igor/travis/client/TravisClientSpec.groovy index d6a72ae92..17c5cb5cb 100644 --- a/igor-monitor-travis/src/test/groovy/com/netflix/spinnaker/igor/travis/client/TravisClientSpec.groovy +++ b/igor-monitor-travis/src/test/groovy/com/netflix/spinnaker/igor/travis/client/TravisClientSpec.groovy @@ -27,8 +27,8 @@ import com.netflix.spinnaker.igor.travis.client.model.v3.V3Build import com.netflix.spinnaker.igor.travis.client.model.v3.V3Builds import com.netflix.spinnaker.igor.travis.client.model.v3.V3Log import com.netflix.spinnaker.igor.travis.config.TravisConfig -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification @@ -825,6 +825,6 @@ class TravisClientSpec extends Specification { .setHeader('Content-Type', 'application/json;charset=utf-8') ) server.start() - client = new TravisConfig().travisClient(server.getUrl('/').toString(), 3000, mapper) + client = new TravisConfig().travisClient(server.url('/').toString(), 3000, mapper) } } diff --git a/igor-web/igor-web.gradle b/igor-web/igor-web.gradle index 4ee3acadd..4d0e25572 100644 --- a/igor-web/igor-web.gradle +++ b/igor-web/igor-web.gradle @@ -41,9 +41,6 @@ dependencies { implementation "com.squareup.retrofit:retrofit" implementation "com.squareup.retrofit:converter-jackson" - implementation "com.squareup.okhttp:okhttp" - implementation "com.squareup.okhttp:okhttp-urlconnection" - implementation "com.squareup.okhttp:okhttp-apache" implementation "com.squareup.okhttp3:okhttp-sse" implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0" implementation "io.spinnaker.fiat:fiat-api:$fiatVersion" @@ -79,7 +76,7 @@ dependencies { runtimeOnly "io.spinnaker.kork:kork-runtime" - testImplementation "com.squareup.okhttp:mockwebserver" + testImplementation "com.squareup.okhttp3:mockwebserver" testImplementation "io.spinnaker.kork:kork-jedis-test" testImplementation "org.apache.groovy:groovy-datetime" testImplementation "org.apache.groovy:groovy-json" diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/BitBucketConfig.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/BitBucketConfig.groovy index e962c6b68..5fca1e125 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/BitBucketConfig.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/BitBucketConfig.groovy @@ -21,9 +21,9 @@ import com.netflix.spinnaker.igor.scm.bitbucket.client.BitBucketClient import com.netflix.spinnaker.igor.scm.bitbucket.client.BitBucketMaster import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler import com.netflix.spinnaker.retrofit.Slf4jRetrofitLogger -import com.squareup.okhttp.Credentials import groovy.transform.CompileStatic import groovy.util.logging.Slf4j +import okhttp3.Credentials import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/StashConfig.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/StashConfig.groovy index d0d3554b4..b6da22310 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/StashConfig.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/StashConfig.groovy @@ -20,9 +20,9 @@ import com.jakewharton.retrofit.Ok3Client import com.netflix.spinnaker.igor.scm.stash.client.StashClient import com.netflix.spinnaker.igor.scm.stash.client.StashMaster import com.netflix.spinnaker.retrofit.Slf4jRetrofitLogger -import com.squareup.okhttp.Credentials import groovy.transform.CompileStatic import groovy.util.logging.Slf4j +import okhttp3.Credentials import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/auth/AuthRequestInterceptor.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/auth/AuthRequestInterceptor.groovy index f1ca16b2a..d042a1bb6 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/auth/AuthRequestInterceptor.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/auth/AuthRequestInterceptor.groovy @@ -18,7 +18,7 @@ package com.netflix.spinnaker.igor.config.auth import com.google.auth.oauth2.GoogleCredentials import com.netflix.spinnaker.igor.config.JenkinsProperties -import com.squareup.okhttp.Credentials +import okhttp3.Credentials import groovy.util.logging.Slf4j import retrofit.RequestInterceptor diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketMaster.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketMaster.groovy index 77435be58..8d5c6465d 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketMaster.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketMaster.groovy @@ -20,7 +20,7 @@ import com.jakewharton.retrofit.Ok3Client import com.netflix.spinnaker.igor.config.BitBucketProperties import com.netflix.spinnaker.igor.scm.AbstractScmMaster import com.netflix.spinnaker.retrofit.Slf4jRetrofitLogger -import com.squareup.okhttp.Credentials +import okhttp3.Credentials import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.context.annotation.Bean import retrofit.Endpoints diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/BuildControllerSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/BuildControllerSpec.groovy index 80baf7b4a..b81aed788 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/BuildControllerSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/BuildControllerSpec.groovy @@ -33,7 +33,7 @@ import com.netflix.spinnaker.igor.travis.service.TravisService import com.netflix.spinnaker.kork.web.exceptions.ExceptionMessageDecorator import com.netflix.spinnaker.kork.web.exceptions.GenericExceptionHandlers import com.netflix.spinnaker.kork.web.exceptions.NotFoundException -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockWebServer import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.mock.web.MockHttpServletResponse diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/InfoControllerSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/InfoControllerSpec.groovy index 3e2b37910..d6549347a 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/InfoControllerSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/build/InfoControllerSpec.groovy @@ -27,8 +27,8 @@ import com.netflix.spinnaker.igor.service.BuildOperations import com.netflix.spinnaker.igor.service.BuildServices import com.netflix.spinnaker.igor.travis.service.TravisService import com.netflix.spinnaker.igor.wercker.WerckerService -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import groovy.json.JsonSlurper import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry import org.springframework.http.MediaType @@ -315,7 +315,7 @@ class InfoControllerSpec extends Specification { ) server.start() def host = new JenkinsProperties.JenkinsHost( - address: server.getUrl('/').toString(), + address: server.url('/').toString(), username: 'username', password: 'password') service = new JenkinsConfig().jenkinsService("jenkins", new JenkinsConfig().jenkinsClient(host), false, Permissions.EMPTY, circuitBreakerRegistry) diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/concourse/client/ConcourseClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/concourse/client/ConcourseClientSpec.groovy index e52599f23..9c550e533 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/concourse/client/ConcourseClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/concourse/client/ConcourseClientSpec.groovy @@ -1,21 +1,12 @@ package com.netflix.spinnaker.igor.concourse.client -import com.fasterxml.jackson.databind.ObjectMapper -import com.netflix.spinnaker.igor.concourse.client.ConcourseClient -import com.netflix.spinnaker.igor.concourse.client.SkyService -import com.netflix.spinnaker.igor.concourse.client.SkyServiceV2 -import com.netflix.spinnaker.igor.concourse.client.TokenService -import com.netflix.spinnaker.igor.concourse.client.TokenServiceV2 -import com.netflix.spinnaker.igor.concourse.client.model.Token -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer -import com.squareup.okhttp.mockwebserver.RecordedRequest +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer +import okhttp3.mockwebserver.RecordedRequest import retrofit.client.Response; import spock.lang.Shared import spock.lang.Specification -import java.time.ZonedDateTime - class ConcourseClientSpec extends Specification { @Shared @@ -145,6 +136,6 @@ class ConcourseClientSpec extends Specification { ) } server.start() - client = new ConcourseClient(server.getUrl('/').toString(), "test-username", "test-password") + client = new ConcourseClient(server.url('/').toString(), "test-username", "test-password") } } diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/gitlabci/client/GitlabCiClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/gitlabci/client/GitlabCiClientSpec.groovy index bee22aa3a..578ac0508 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/gitlabci/client/GitlabCiClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/gitlabci/client/GitlabCiClientSpec.groovy @@ -20,8 +20,8 @@ import com.netflix.spinnaker.igor.config.GitlabCiConfig import com.netflix.spinnaker.igor.gitlabci.client.model.Pipeline import com.netflix.spinnaker.igor.gitlabci.client.model.PipelineStatus import com.netflix.spinnaker.igor.gitlabci.client.model.Project -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/client/JenkinsClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/client/JenkinsClientSpec.groovy index a26196eb2..c21190163 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/client/JenkinsClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/client/JenkinsClientSpec.groovy @@ -24,8 +24,8 @@ import com.netflix.spinnaker.igor.jenkins.client.model.JobConfig import com.netflix.spinnaker.igor.jenkins.client.model.Project import com.netflix.spinnaker.igor.jenkins.client.model.ProjectsList import com.netflix.spinnaker.igor.model.Crumb -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification /** @@ -233,7 +233,7 @@ class JenkinsClientSpec extends Specification { ) server.start() def host = new JenkinsProperties.JenkinsHost( - address: server.getUrl('/').toString(), + address: server.url('/').toString(), username: 'username', password: 'password') client = new JenkinsConfig().jenkinsClient(host) diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/service/JenkinsServiceSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/service/JenkinsServiceSpec.groovy index ca8c0f60e..6b5964448 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/service/JenkinsServiceSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/jenkins/service/JenkinsServiceSpec.groovy @@ -27,9 +27,8 @@ import com.netflix.spinnaker.igor.jenkins.client.model.BuildArtifact import com.netflix.spinnaker.igor.jenkins.client.model.BuildsList import com.netflix.spinnaker.igor.jenkins.client.model.Project import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer -import io.github.resilience4j.circuitbreaker.CircuitBreaker +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry import retrofit.RetrofitError import retrofit.client.Response @@ -189,7 +188,7 @@ class JenkinsServiceSpec extends Specification { ) server.start() def host = new JenkinsProperties.JenkinsHost( - address: server.getUrl('/').toString(), + address: server.url('/').toString(), username: 'username', password: 'password') client = new JenkinsConfig().jenkinsClient(host) diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketClientSpec.groovy index 1fd8469a9..36bffc4ee 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/bitbucket/client/BitBucketClientSpec.groovy @@ -18,8 +18,8 @@ package com.netflix.spinnaker.igor.scm.bitbucket.client import com.netflix.spinnaker.igor.config.BitBucketConfig import com.netflix.spinnaker.igor.scm.bitbucket.client.model.CompareCommitsResponse -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification @@ -49,7 +49,7 @@ class BitBucketClientSpec extends Specification { .setHeader('Content-Type', 'text/xml;charset=UTF-8') ) server.start() - client = new BitBucketConfig().bitBucketClient(server.getUrl('/').toString(), 'username', 'password') + client = new BitBucketConfig().bitBucketClient(server.url('/').toString(), 'username', 'password') } void 'getCompareCommits'() { diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/github/client/GitHubClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/github/client/GitHubClientSpec.groovy index eabf1716b..c39b9ca40 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/github/client/GitHubClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/github/client/GitHubClientSpec.groovy @@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.netflix.spinnaker.igor.config.GitHubConfig import com.netflix.spinnaker.igor.scm.github.client.model.CompareCommitsResponse import com.netflix.spinnaker.igor.scm.github.client.model.GetRepositoryContentResponse -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification @@ -59,7 +59,7 @@ class GitHubClientSpec extends Specification { .setHeader('Content-Type', 'text/xml;charset=UTF-8') ) server.start() - client = new GitHubConfig().gitHubClient(server.getUrl('/').toString(), 'token', mapper) + client = new GitHubConfig().gitHubClient(server.url('/').toString(), 'token', mapper) } void 'getDirectoryContent'() { diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/gitlab/client/GitLabClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/gitlab/client/GitLabClientSpec.groovy index 1fc207dd7..272403c63 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/gitlab/client/GitLabClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/gitlab/client/GitLabClientSpec.groovy @@ -18,13 +18,11 @@ package com.netflix.spinnaker.igor.scm.gitlab.client import com.netflix.spinnaker.igor.config.GitLabConfig import com.netflix.spinnaker.igor.scm.gitlab.client.model.CompareCommitsResponse -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import spock.lang.Shared import spock.lang.Specification -import java.time.Instant - class GitLabClientSpec extends Specification { @Shared @@ -48,7 +46,7 @@ class GitLabClientSpec extends Specification { .setHeader('Content-Type', 'text/xml;charset=UTF-8') ) server.start() - client = new GitLabConfig().gitLabClient(server.getUrl('/').toString(), "token") + client = new GitLabConfig().gitLabClient(server.url('/').toString(), "token") } void 'getCompareCommits'() { diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/stash/client/StashClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/stash/client/StashClientSpec.groovy index e91efccaa..05cd25f92 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/stash/client/StashClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/scm/stash/client/StashClientSpec.groovy @@ -21,8 +21,8 @@ import com.netflix.spinnaker.igor.scm.ScmMaster import com.netflix.spinnaker.igor.scm.stash.client.model.CompareCommitsResponse import com.netflix.spinnaker.igor.scm.stash.client.model.DirectoryListingResponse import com.netflix.spinnaker.igor.scm.stash.client.model.TextLinesResponse -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import retrofit.RestAdapter import spock.lang.Shared import spock.lang.Specification @@ -54,7 +54,7 @@ class StashClientSpec extends Specification { .setHeader('Content-Type', contentType) ) server.start() - client = new StashConfig().stashClient(server.getUrl('/').toString(), 'username', 'password', RestAdapter.LogLevel.BASIC) + client = new StashConfig().stashClient(server.url('/').toString(), 'username', 'password', RestAdapter.LogLevel.BASIC) } void 'getCompareCommits'() { diff --git a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/wercker/WerckerClientSpec.groovy b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/wercker/WerckerClientSpec.groovy index 6463b825f..5f570e14a 100644 --- a/igor-web/src/test/groovy/com/netflix/spinnaker/igor/wercker/WerckerClientSpec.groovy +++ b/igor-web/src/test/groovy/com/netflix/spinnaker/igor/wercker/WerckerClientSpec.groovy @@ -16,8 +16,8 @@ import com.netflix.spinnaker.config.okhttp3.OkHttpClientProvider import com.netflix.spinnaker.igor.config.* import com.netflix.spinnaker.igor.config.WerckerProperties.WerckerHost import com.netflix.spinnaker.igor.wercker.model.* -import com.squareup.okhttp.mockwebserver.MockResponse -import com.squareup.okhttp.mockwebserver.MockWebServer +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer import okhttp3.OkHttpClient import retrofit.RestAdapter import spock.lang.Shared diff --git a/igor-web/src/test/java/com/netflix/spinnaker/igor/concourse/ConcourseBuildMonitorTest.java b/igor-web/src/test/java/com/netflix/spinnaker/igor/concourse/ConcourseBuildMonitorTest.java index ecf0bcdfb..56610d7f4 100644 --- a/igor-web/src/test/java/com/netflix/spinnaker/igor/concourse/ConcourseBuildMonitorTest.java +++ b/igor-web/src/test/java/com/netflix/spinnaker/igor/concourse/ConcourseBuildMonitorTest.java @@ -28,10 +28,10 @@ import com.netflix.spinnaker.igor.service.BuildServices; import com.netflix.spinnaker.kork.discovery.DiscoveryStatusListener; import com.netflix.spinnaker.kork.dynamicconfig.DynamicConfigService; -import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.MockWebServer; import java.util.Collections; import java.util.Optional; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.scheduling.TaskScheduler;