@@ -74,9 +74,7 @@ void tearDown() {
74
74
75
75
@ Test
76
76
void promoteWhenSuccessful () {
77
- this .server
78
- .expect (requestTo (
79
- "https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
77
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
80
78
.andExpect (method (HttpMethod .POST ))
81
79
.andExpect (content ().json (
82
80
"{\" status\" : \" staged\" , \" sourceRepo\" : \" libs-staging-local\" , \" targetRepo\" : \" libs-milestone-local\" }" ))
@@ -89,9 +87,7 @@ void promoteWhenSuccessful() {
89
87
90
88
@ Test
91
89
void promoteWhenArtifactsAlreadyPromoted () {
92
- this .server
93
- .expect (requestTo (
94
- "https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
90
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
95
91
.andRespond (withStatus (HttpStatus .CONFLICT ));
96
92
this .server .expect (requestTo ("https://repo.spring.io/api/build/example-build/example-build-1" ))
97
93
.andRespond (withJsonFrom ("build-info-response.json" ));
@@ -101,9 +97,7 @@ void promoteWhenArtifactsAlreadyPromoted() {
101
97
102
98
@ Test
103
99
void promoteWhenCheckForArtifactsAlreadyPromotedFails () {
104
- this .server
105
- .expect (requestTo (
106
- "https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
100
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
107
101
.andRespond (withStatus (HttpStatus .CONFLICT ));
108
102
this .server .expect (requestTo ("https://repo.spring.io/api/build/example-build/example-build-1" ))
109
103
.andRespond (withStatus (HttpStatus .FORBIDDEN ));
@@ -114,9 +108,7 @@ void promoteWhenCheckForArtifactsAlreadyPromotedFails() {
114
108
115
109
@ Test
116
110
void promoteWhenPromotionFails () {
117
- this .server
118
- .expect (requestTo (
119
- "https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
111
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/promote/example-build/example-build-1" ))
120
112
.andRespond (withStatus (HttpStatus .CONFLICT ));
121
113
this .server .expect (requestTo ("https://repo.spring.io/api/build/example-build/example-build-1" ))
122
114
.andRespond (withJsonFrom ("staged-build-info-response.json" ));
@@ -129,9 +121,7 @@ void promoteWhenPromotionFails() {
129
121
void distributeWhenSuccessful () throws Exception {
130
122
ReleaseInfo releaseInfo = getReleaseInfo ();
131
123
given (this .bintrayService .isDistributionComplete (releaseInfo )).willReturn (true );
132
- this .server
133
- .expect (requestTo (
134
- "https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
124
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
135
125
.andExpect (method (HttpMethod .POST ))
136
126
.andExpect (content ().json (
137
127
"{\" sourceRepos\" : [\" libs-release-local\" ], \" targetRepo\" : \" spring-distributions\" , \" async\" :\" true\" }" ))
@@ -146,9 +136,7 @@ void distributeWhenSuccessful() throws Exception {
146
136
@ Test
147
137
void distributeWhenFailure () throws Exception {
148
138
ReleaseInfo releaseInfo = getReleaseInfo ();
149
- this .server
150
- .expect (requestTo (
151
- "https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
139
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
152
140
.andExpect (method (HttpMethod .POST ))
153
141
.andExpect (content ().json (
154
142
"{\" sourceRepos\" : [\" libs-release-local\" ], \" targetRepo\" : \" spring-distributions\" , \" async\" :\" true\" }" ))
@@ -166,9 +154,7 @@ void distributeWhenFailure() throws Exception {
166
154
void distributeWhenGettingPackagesTimesOut () throws Exception {
167
155
ReleaseInfo releaseInfo = getReleaseInfo ();
168
156
given (this .bintrayService .isDistributionComplete (releaseInfo )).willReturn (false );
169
- this .server
170
- .expect (requestTo (
171
- "https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
157
+ this .server .expect (requestTo ("https://repo.spring.io/api/build/distribute/example-build/example-build-1" ))
172
158
.andExpect (method (HttpMethod .POST ))
173
159
.andExpect (content ().json (
174
160
"{\" sourceRepos\" : [\" libs-release-local\" ], \" targetRepo\" : \" spring-distributions\" , \" async\" :\" true\" }" ))
0 commit comments