Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
362297a0
Commit
362297a0
authored
Feb 13, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting
parent
68f59a0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
ArtifactoryServiceTests.java
...e/releasescripts/artifactory/ArtifactoryServiceTests.java
+7
-21
No files found.
ci/images/releasescripts/src/test/java/io/spring/concourse/releasescripts/artifactory/ArtifactoryServiceTests.java
View file @
362297a0
...
...
@@ -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\"}"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment