Commit 362297a0 authored by Stephane Nicoll's avatar Stephane Nicoll

Fix formatting

parent 68f59a0d
...@@ -74,9 +74,7 @@ class ArtifactoryServiceTests { ...@@ -74,9 +74,7 @@ class ArtifactoryServiceTests {
@Test @Test
void promoteWhenSuccessful() { void promoteWhenSuccessful() {
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.andExpect(method(HttpMethod.POST)) .andExpect(method(HttpMethod.POST))
.andExpect(content().json( .andExpect(content().json(
"{\"status\": \"staged\", \"sourceRepo\": \"libs-staging-local\", \"targetRepo\": \"libs-milestone-local\"}")) "{\"status\": \"staged\", \"sourceRepo\": \"libs-staging-local\", \"targetRepo\": \"libs-milestone-local\"}"))
...@@ -89,9 +87,7 @@ class ArtifactoryServiceTests { ...@@ -89,9 +87,7 @@ class ArtifactoryServiceTests {
@Test @Test
void promoteWhenArtifactsAlreadyPromoted() { void promoteWhenArtifactsAlreadyPromoted() {
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.andRespond(withStatus(HttpStatus.CONFLICT)); .andRespond(withStatus(HttpStatus.CONFLICT));
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1")) this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
.andRespond(withJsonFrom("build-info-response.json")); .andRespond(withJsonFrom("build-info-response.json"));
...@@ -101,9 +97,7 @@ class ArtifactoryServiceTests { ...@@ -101,9 +97,7 @@ class ArtifactoryServiceTests {
@Test @Test
void promoteWhenCheckForArtifactsAlreadyPromotedFails() { void promoteWhenCheckForArtifactsAlreadyPromotedFails() {
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.andRespond(withStatus(HttpStatus.CONFLICT)); .andRespond(withStatus(HttpStatus.CONFLICT));
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1")) this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
.andRespond(withStatus(HttpStatus.FORBIDDEN)); .andRespond(withStatus(HttpStatus.FORBIDDEN));
...@@ -114,9 +108,7 @@ class ArtifactoryServiceTests { ...@@ -114,9 +108,7 @@ class ArtifactoryServiceTests {
@Test @Test
void promoteWhenPromotionFails() { void promoteWhenPromotionFails() {
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
.andRespond(withStatus(HttpStatus.CONFLICT)); .andRespond(withStatus(HttpStatus.CONFLICT));
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1")) this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
.andRespond(withJsonFrom("staged-build-info-response.json")); .andRespond(withJsonFrom("staged-build-info-response.json"));
...@@ -129,9 +121,7 @@ class ArtifactoryServiceTests { ...@@ -129,9 +121,7 @@ class ArtifactoryServiceTests {
void distributeWhenSuccessful() throws Exception { void distributeWhenSuccessful() throws Exception {
ReleaseInfo releaseInfo = getReleaseInfo(); ReleaseInfo releaseInfo = getReleaseInfo();
given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(true); given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(true);
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.andExpect(method(HttpMethod.POST)) .andExpect(method(HttpMethod.POST))
.andExpect(content().json( .andExpect(content().json(
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}")) "{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
...@@ -146,9 +136,7 @@ class ArtifactoryServiceTests { ...@@ -146,9 +136,7 @@ class ArtifactoryServiceTests {
@Test @Test
void distributeWhenFailure() throws Exception { void distributeWhenFailure() throws Exception {
ReleaseInfo releaseInfo = getReleaseInfo(); ReleaseInfo releaseInfo = getReleaseInfo();
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.andExpect(method(HttpMethod.POST)) .andExpect(method(HttpMethod.POST))
.andExpect(content().json( .andExpect(content().json(
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}")) "{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
...@@ -166,9 +154,7 @@ class ArtifactoryServiceTests { ...@@ -166,9 +154,7 @@ class ArtifactoryServiceTests {
void distributeWhenGettingPackagesTimesOut() throws Exception { void distributeWhenGettingPackagesTimesOut() throws Exception {
ReleaseInfo releaseInfo = getReleaseInfo(); ReleaseInfo releaseInfo = getReleaseInfo();
given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(false); given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(false);
this.server this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.expect(requestTo(
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
.andExpect(method(HttpMethod.POST)) .andExpect(method(HttpMethod.POST))
.andExpect(content().json( .andExpect(content().json(
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}")) "{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment