File tree 3 files changed +26
-20
lines changed
buildpacks/maven/tests/integration
3 files changed +26
-20
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use libcnb_test::{assert_contains, TestRunner};
7
7
fn maven_custom_goals ( ) {
8
8
TestRunner :: default ( ) . build ( default_build_config ( "test-apps/simple-http-service" ) . env ( "MAVEN_CUSTOM_GOALS" , "site" ) , |context| {
9
9
// Assert only the goals in MAVEN_CUSTOM_GOALS are executed
10
- assert_contains ! ( context. pack_stdout, "./mvnw -DskipTests site" ) ;
10
+ assert_contains ! ( context. pack_stdout, "Running ` ./mvnw -DskipTests -B site` " ) ;
11
11
assert_contains ! ( context. pack_stdout, "[INFO] --- maven-site-plugin:3.7.1:site (default-site) @ simple-http-service ---" ) ;
12
12
13
13
// The dependency list is implemented by using the dependency:list goal. We need to
Original file line number Diff line number Diff line change @@ -117,17 +117,18 @@ fn no_internal_maven_options_logging() {
117
117
#[ test]
118
118
#[ ignore = "integration test" ]
119
119
fn descriptive_error_message_on_failed_build ( ) {
120
- TestRunner :: default ( ) . build ( default_build_config ( "test-apps/app-with-compile-error" ) . expected_pack_result ( PackResult :: Failure ) , |context| {
120
+ TestRunner :: default ( ) . build (
121
+ default_build_config ( "test-apps/app-with-compile-error" )
122
+ . expected_pack_result ( PackResult :: Failure ) ,
123
+ |context| {
121
124
assert_contains ! ( context. pack_stdout, "[INFO] BUILD FAILURE" ) ;
122
125
123
- assert_contains ! (
124
- context. pack_stderr,
125
- "! ERROR: Unexpected Maven exit code"
126
- ) ;
126
+ assert_contains ! ( context. pack_stderr, "! ERROR: Unexpected Maven exit code" ) ;
127
127
128
128
assert_contains ! (
129
129
context. pack_stderr,
130
- "Maven unexpectedly exited with code '1'. The most common reason for this are \n problems with your application code and/or build configuration. "
130
+ "Maven unexpectedly exited with code '1'."
131
131
) ;
132
- } ) ;
132
+ } ,
133
+ ) ;
133
134
}
Original file line number Diff line number Diff line change @@ -26,18 +26,23 @@ fn maven_settings_url_success() {
26
26
fn maven_settings_url_failure ( ) {
27
27
TestRunner :: default ( ) . build (
28
28
default_build_config ( "test-apps/simple-http-service" )
29
- . env ( "MAVEN_SETTINGS_URL" , SETTINGS_XML_URL_404 )
30
- . expected_pack_result ( PackResult :: Failure ) ,
31
- |context| {
32
- assert_contains ! (
33
- context. pack_stderr,
34
- & format!( "You have set MAVEN_SETTINGS_URL to \" {SETTINGS_XML_URL_404}\" . We tried to download the file at this\n URL, but the download failed. Please verify that the given URL is correct and try again." )
35
- ) ;
36
-
37
- // This error message comes from Maven itself. We don't expect Maven to to be executed at all.
38
- assert_not_contains ! ( context. pack_stdout, "[INFO] BUILD FAILURE" ) ;
39
- } ,
40
- ) ;
29
+ . env ( "MAVEN_SETTINGS_URL" , SETTINGS_XML_URL_404 )
30
+ . expected_pack_result ( PackResult :: Failure ) ,
31
+ |context| {
32
+ assert_contains ! (
33
+ context. pack_stderr,
34
+ & format!( "You have set MAVEN_SETTINGS_URL to \" {SETTINGS_XML_URL_404}\" ." )
35
+ ) ;
36
+
37
+ assert_contains ! (
38
+ context. pack_stderr,
39
+ "Please verify that the given URL is correct and try again."
40
+ ) ;
41
+
42
+ // This error message comes from Maven itself. We don't expect Maven to to be executed at all.
43
+ assert_not_contains ! ( context. pack_stdout, "[INFO] BUILD FAILURE" ) ;
44
+ } ,
45
+ ) ;
41
46
}
42
47
43
48
#[ test]
You can’t perform that action at this time.
0 commit comments