michael-o commented on a change in pull request #87:
URL: 
https://github.com/apache/maven-integration-testing/pull/87#discussion_r563393294



##########
File path: 
core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
##########
@@ -106,6 +106,10 @@ public static Test suite()
         // Tests that don't run stable and need to be fixed
         // 
-------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- 
MNG-3137
+        suite.addTestSuite( 
MavenITmng4106InterpolationUsesDominantProfile400Test.class );

Review comment:
       I am a bit confused by this. Some of the are already there, why they pop 
up here now and why have some disabled?

##########
File path: 
core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7051NonExistingProfileActivationTest.java
##########
@@ -0,0 +1,94 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.io.IOException;
+
+public class MavenITmng7051NonExistingProfileActivationTest
+        extends AbstractMavenIntegrationTestCase
+{
+    private static final String PROJECT_PATH = 
"/mng-7051-non-existing-profile-activation";
+
+    public MavenITmng7051NonExistingProfileActivationTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    /**
+     * This test verifies that activating a non-existing profile breaks the 
build.
+     */
+    public void testActivatingNonExistingProfileBreaks() throws IOException, 
VerificationException
+    {
+        final File projectDir = ResourceExtractor.simpleExtractResources( 
getClass(), PROJECT_PATH );
+        final Verifier verifier = newVerifier( projectDir.getAbsolutePath() );
+
+        verifier.addCliOption( "-P" );
+        verifier.addCliOption( "non-existing-profile" );
+        verifier.setLogFileName( "test-breaking.txt" );
+
+        try
+        {
+            verifier.executeGoal( "validate" );
+            fail( "Activated a non-existing profile without ? prefix should 
break the build, but it didn't." );
+        }
+        catch ( VerificationException ve )
+        {
+            // Inspect the reason why the build broke.
+            verifier.verifyTextInLog( "The requested profile(s) 
\"non-existing-profile\" could not be activated or de-activated because they do 
not exist." );

Review comment:
       Make sure that you verify a warning with the `[WARNING]` prefix, some 
other ITs do this too.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to