Use consistent exception messages in Assert calls
Update `Assert` calls to consistently use messages of the form "'item' must [not] ...". Closes gh-43780
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -482,7 +482,7 @@ class BootBuildImageIntegrationTests {
|
||||
writeLongNameResource();
|
||||
BuildResult result = this.gradleBuild.buildAndFail("bootBuildImage", "--imageName=example/Invalid-Image-Name");
|
||||
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.FAILED);
|
||||
assertThat(result.getOutput()).containsPattern("Unable to parse image reference")
|
||||
assertThat(result.getOutput()).containsPattern("must be an image reference")
|
||||
.containsPattern("example/Invalid-Image-Name");
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ class BootBuildImageIntegrationTests {
|
||||
writeLongNameResource();
|
||||
BuildResult result = this.gradleBuild.buildAndFail("bootBuildImage");
|
||||
assertThat(result.task(":bootBuildImage").getOutcome()).isEqualTo(TaskOutcome.FAILED);
|
||||
assertThat(result.getOutput()).containsPattern("Unable to parse image reference")
|
||||
assertThat(result.getOutput()).containsPattern("must be an image reference")
|
||||
.containsPattern("example/Invalid-Tag-Name");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user