[KEYCLOAK-19847] - Restore Docker Dist tests coverage

This commit is contained in:
andreaTP 2021-12-02 18:03:46 +00:00 committed by Pedro Igor
parent 28673ed4d8
commit 8750d94140
3 changed files with 7 additions and 3 deletions

View file

@ -414,7 +414,7 @@ jobs:
- name: Run Quarkus Tests in Docker - name: Run Quarkus Tests in Docker
run: | run: |
mvn clean install -nsu -B -f quarkus/tests/pom.xml -Dkc.quarkus.tests.dist=docker -Dtest=StartDevCommandTest | misc/log/trimmer.sh mvn clean install -nsu -B -f quarkus/tests/pom.xml -Dkc.quarkus.tests.dist=docker | misc/log/trimmer.sh
TEST_RESULT=${PIPESTATUS[0]} TEST_RESULT=${PIPESTATUS[0]}
exit $TEST_RESULT exit $TEST_RESULT

View file

@ -51,6 +51,8 @@ class BuildCommandDistTest {
() -> "The Error Output:\n" + result.getErrorOutput() + "doesn't contains the expected string."); () -> "The Error Output:\n" + result.getErrorOutput() + "doesn't contains the expected string.");
assertTrue(result.getErrorOutput().contains("For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command."), assertTrue(result.getErrorOutput().contains("For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command."),
() -> "The Error Output:\n" + result.getErrorOutput() + "doesn't contains the expected string."); () -> "The Error Output:\n" + result.getErrorOutput() + "doesn't contains the expected string.");
assertEquals(4, result.getErrorStream().size()); String errorString = "";
for (String s: result.getErrorStream()) { errorString += s + "\n"; }
assertEquals(4, errorString.split("\n").length);
} }
} }

View file

@ -35,6 +35,8 @@ public class StartCommandDistTest extends StartCommandTest {
void failIfAutoBuildUsingDevProfile(LaunchResult result) { void failIfAutoBuildUsingDevProfile(LaunchResult result) {
assertTrue(result.getErrorOutput().contains("ERROR: You can not 'start' the server using the 'dev' configuration profile. Please re-build the server first, using 'kc.sh build' for the default production profile, or using 'kc.sh build --profile=<profile>' with a profile more suitable for production."), assertTrue(result.getErrorOutput().contains("ERROR: You can not 'start' the server using the 'dev' configuration profile. Please re-build the server first, using 'kc.sh build' for the default production profile, or using 'kc.sh build --profile=<profile>' with a profile more suitable for production."),
() -> "The Output:\n" + result.getErrorOutput() + "doesn't contains the expected string."); () -> "The Output:\n" + result.getErrorOutput() + "doesn't contains the expected string.");
assertEquals(4, result.getErrorStream().size()); String errorString = "";
for (String s: result.getErrorStream()) { errorString += s + "\n"; }
assertEquals(4, errorString.split("\n").length);
} }
} }