Fixing tests
This commit is contained in:
@@ -91,9 +91,10 @@ public class ReleaseBundleCreator {
|
||||
log.info("Creating release bundle with JSON [{}]", json);
|
||||
|
||||
ArtifactoryRequest aqlRequest = new ArtifactoryRequestImpl().method(ArtifactoryRequest.Method.POST)
|
||||
.apiUrl("lifecycle/api/v2/release_bundle").addQueryParam("project", "spring").addQueryParam("async", "false")
|
||||
.addHeader("X-JFrog-Signing-Key-Name", "packagesKey").requestType(ArtifactoryRequest.ContentType.JSON)
|
||||
.responseType(ArtifactoryRequest.ContentType.JSON).requestBody(json);
|
||||
.apiUrl("lifecycle/api/v2/release_bundle").addQueryParam("project", "spring")
|
||||
.addQueryParam("async", "false").addHeader("X-JFrog-Signing-Key-Name", "packagesKey")
|
||||
.requestType(ArtifactoryRequest.ContentType.JSON).responseType(ArtifactoryRequest.ContentType.JSON)
|
||||
.requestBody(json);
|
||||
return makeArtifactoryRequest(aqlRequest);
|
||||
}
|
||||
|
||||
|
||||
@@ -211,11 +211,16 @@ public class SaganUpdater {
|
||||
if (version.isSnapshot()) {
|
||||
antoraVersions += "-SNAPSHOT";
|
||||
}
|
||||
//TODO uncomment the below line and remove the logic above once Contentful "Antora Version" checkbox
|
||||
// bug is fixed. Currently the checkbox is not being saved and is always unchecked when using the REST API
|
||||
// and this results in the version now being computed propertly by Contentful. Therefore we compute the version
|
||||
// in the documentation URL ourselves instead of using the {version} placeholder and letting Contentful compute the
|
||||
// version. NOTE: Tests in {@link SaganUpdaterTests} will need to be updated as well once the fix is in place.
|
||||
// TODO uncomment the below line and remove the logic above once Contentful
|
||||
// "Antora Version" checkbox
|
||||
// bug is fixed. Currently the checkbox is not being saved and is always unchecked
|
||||
// when using the REST API
|
||||
// and this results in the version now being computed propertly by Contentful.
|
||||
// Therefore we compute the version
|
||||
// in the documentation URL ourselves instead of using the {version} placeholder
|
||||
// and letting Contentful compute the
|
||||
// version. NOTE: Tests in {@link SaganUpdaterTests} will need to be updated as
|
||||
// well once the fix is in place.
|
||||
// return "https://docs.spring.io/" + version.projectName +
|
||||
// "/reference/{version}/";
|
||||
return "https://docs.spring.io/" + version.projectName + "/reference/" + antoraVersions + "/";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id" : "0b389dc6-1b73-487d-8122-41f1c974647f",
|
||||
"name" : "create_project_release_bundle_mapping",
|
||||
"request" : {
|
||||
"url" : "/lifecycle/api/v2/release_bundle?project=spring",
|
||||
"url" : "/lifecycle/api/v2/release_bundle?async=false&project=spring",
|
||||
"method" : "POST",
|
||||
"bodyPatterns" : [ {
|
||||
"equalToJson" : "{\"release_bundle_version\":\"4.0.7\",\"release_bundle_name\":\"TNZ-spring-cloud-build-commercial\",\"source_type\":\"aql\",\"source\":{\"aql\":\"items.find({\\\"repo\\\":{\\\"$eq\\\":\\\"spring-enterprise-maven-prod-local\\\"},\\\"$or\\\":[{\\\"path\\\":{\\\"$match\\\":\\\"org/springframework/cloud/spring-cloud-build*/4.0.7\\\"}},{\\\"path\\\":{\\\"$match\\\":\\\"org/springframework/cloud/spring-cloud-starter-build*/4.0.7\\\"}},{\\\"path\\\":{\\\"$match\\\":\\\"org/springframework/cloud/spring-cloud-dependencies-parent*/4.0.7\\\"}}]}).sort({\\\"$asc\\\":[\\\"path\\\",\\\"name\\\"]})\"}}",
|
||||
@@ -2,7 +2,7 @@
|
||||
"id" : "0b389dc6-1b73-487d-8122-41f1c974647f",
|
||||
"name" : "create_release_train_source_bundle_mapping",
|
||||
"request" : {
|
||||
"url" : "/lifecycle/api/v2/release_bundle?project=spring",
|
||||
"url" : "/lifecycle/api/v2/release_bundle?async=false&project=spring",
|
||||
"method" : "POST",
|
||||
"bodyPatterns" : [ {
|
||||
"equalToJson" : "{\"release_bundle_name\": \"TNZ-spring-cloud-commercial-release\",\"release_bundle_version\": \"2022.0.7\",\"skip_docker_manifest_resolution\": false,\"source_type\": \"release_bundles\",\"source\": {\"release_bundles\": [{\"project_key\": \"spring\",\"repository_key\": \"spring-release-bundles-v2\",\"release_bundle_name\": \"TNZ-spring-cloud-build-commercial\",\"release_bundle_version\": \"4.0.8\"},{\"project_key\": \"spring\",\"repository_key\": \"spring-release-bundles-v2\",\"release_bundle_name\": \"TNZ-spring-cloud-config-commercial\",\"release_bundle_version\": \"4.0.7\"},{\"project_key\": \"spring\",\"repository_key\": \"spring-release-bundles-v2\",\"release_bundle_name\": \"TNZ-spring-cloud-starter-commercial\",\"release_bundle_version\": \"2022.0.7\"},{\"project_key\": \"spring\",\"repository_key\": \"spring-release-bundles-v2\",\"release_bundle_name\": \"TNZ-spring-cloud-vault-commercial\",\"release_bundle_version\": \"4.0.7\"}]}}",
|
||||
|
||||
Reference in New Issue
Block a user