mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix formatting
This commit is contained in:
parent
68f59a0d40
commit
362297a010
@ -74,9 +74,7 @@ class ArtifactoryServiceTests {
|
||||
|
||||
@Test
|
||||
void promoteWhenSuccessful() {
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
.andExpect(method(HttpMethod.POST))
|
||||
.andExpect(content().json(
|
||||
"{\"status\": \"staged\", \"sourceRepo\": \"libs-staging-local\", \"targetRepo\": \"libs-milestone-local\"}"))
|
||||
@ -89,9 +87,7 @@ class ArtifactoryServiceTests {
|
||||
|
||||
@Test
|
||||
void promoteWhenArtifactsAlreadyPromoted() {
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
.andRespond(withStatus(HttpStatus.CONFLICT));
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
|
||||
.andRespond(withJsonFrom("build-info-response.json"));
|
||||
@ -101,9 +97,7 @@ class ArtifactoryServiceTests {
|
||||
|
||||
@Test
|
||||
void promoteWhenCheckForArtifactsAlreadyPromotedFails() {
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
.andRespond(withStatus(HttpStatus.CONFLICT));
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
|
||||
.andRespond(withStatus(HttpStatus.FORBIDDEN));
|
||||
@ -114,9 +108,7 @@ class ArtifactoryServiceTests {
|
||||
|
||||
@Test
|
||||
void promoteWhenPromotionFails() {
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/promote/example-build/example-build-1"))
|
||||
.andRespond(withStatus(HttpStatus.CONFLICT));
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/example-build/example-build-1"))
|
||||
.andRespond(withJsonFrom("staged-build-info-response.json"));
|
||||
@ -129,9 +121,7 @@ class ArtifactoryServiceTests {
|
||||
void distributeWhenSuccessful() throws Exception {
|
||||
ReleaseInfo releaseInfo = getReleaseInfo();
|
||||
given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(true);
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
.andExpect(method(HttpMethod.POST))
|
||||
.andExpect(content().json(
|
||||
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
|
||||
@ -146,9 +136,7 @@ class ArtifactoryServiceTests {
|
||||
@Test
|
||||
void distributeWhenFailure() throws Exception {
|
||||
ReleaseInfo releaseInfo = getReleaseInfo();
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
.andExpect(method(HttpMethod.POST))
|
||||
.andExpect(content().json(
|
||||
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
|
||||
@ -166,9 +154,7 @@ class ArtifactoryServiceTests {
|
||||
void distributeWhenGettingPackagesTimesOut() throws Exception {
|
||||
ReleaseInfo releaseInfo = getReleaseInfo();
|
||||
given(this.bintrayService.isDistributionComplete(releaseInfo)).willReturn(false);
|
||||
this.server
|
||||
.expect(requestTo(
|
||||
"https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
this.server.expect(requestTo("https://repo.spring.io/api/build/distribute/example-build/example-build-1"))
|
||||
.andExpect(method(HttpMethod.POST))
|
||||
.andExpect(content().json(
|
||||
"{\"sourceRepos\": [\"libs-release-local\"], \"targetRepo\" : \"spring-distributions\", \"async\":\"true\"}"))
|
||||
|
Loading…
Reference in New Issue
Block a user