|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2021 the original author or authors.
|
|
|
|
* Copyright 2012-2023 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -70,8 +70,11 @@ class ArtifactoryServiceTests {
|
|
|
|
.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\"}"))
|
|
|
|
.andExpect(header("Authorization", "Basic " + Base64.getEncoder().encodeToString(String
|
|
|
|
.andExpect(
|
|
|
|
.format("%s:%s", this.properties.getUsername(), this.properties.getPassword()).getBytes())))
|
|
|
|
header("Authorization",
|
|
|
|
|
|
|
|
"Basic " + Base64.getEncoder()
|
|
|
|
|
|
|
|
.encodeToString(String.format("%s:%s", this.properties.getUsername(),
|
|
|
|
|
|
|
|
this.properties.getPassword()).getBytes())))
|
|
|
|
.andExpect(header("Content-Type", MediaType.APPLICATION_JSON.toString())).andRespond(withSuccess());
|
|
|
|
.andExpect(header("Content-Type", MediaType.APPLICATION_JSON.toString())).andRespond(withSuccess());
|
|
|
|
this.service.promote("libs-milestone-local", getReleaseInfo());
|
|
|
|
this.service.promote("libs-milestone-local", getReleaseInfo());
|
|
|
|
this.server.verify();
|
|
|
|
this.server.verify();
|
|
|
|