M1-Fix: Exit-Code für ungültige Konfiguration auf 1 geändert
This commit is contained in:
+4
-4
@@ -46,7 +46,7 @@ class BootstrapRunnerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void run_returnsTwoOnInvalidConfiguration() throws Exception {
|
||||
void run_returnsOneOnInvalidConfiguration() throws Exception {
|
||||
// Create a mock configuration port that returns valid config
|
||||
ConfigurationPort mockConfigPort = new MockConfigurationPort(tempDir, true);
|
||||
|
||||
@@ -67,11 +67,11 @@ class BootstrapRunnerTest {
|
||||
|
||||
int exitCode = runner.run();
|
||||
|
||||
assertEquals(2, exitCode, "Invalid configuration should return exit code 2");
|
||||
assertEquals(1, exitCode, "Invalid configuration should return exit code 1");
|
||||
}
|
||||
|
||||
@Test
|
||||
void run_returnsTwoOnConfigurationLoadingFailure() {
|
||||
void run_returnsOneOnConfigurationLoadingFailure() {
|
||||
// Create a mock configuration port that throws IllegalStateException
|
||||
ConfigurationPort failingConfigPort = () -> {
|
||||
throw new IllegalStateException("Simulated configuration loading failure");
|
||||
@@ -86,7 +86,7 @@ class BootstrapRunnerTest {
|
||||
|
||||
int exitCode = runner.run();
|
||||
|
||||
assertEquals(2, exitCode, "Configuration loading failure should return exit code 2");
|
||||
assertEquals(1, exitCode, "Configuration loading failure should return exit code 1");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+3
-3
@@ -156,11 +156,11 @@ class ExecutableJarSmokeTestIT {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalid-configuration smoke test: verifies controlled failure with exit code 2.
|
||||
* Invalid-configuration smoke test: verifies controlled failure with exit code 1.
|
||||
* <p>
|
||||
* Verifies:
|
||||
* - java -jar runs against invalid configuration
|
||||
* - Exit code is 2
|
||||
* - Exit code is 1
|
||||
* - Startup fails before any processing
|
||||
* - Failure is controlled (not a crash/hang)
|
||||
* - Error output indicates configuration validation failure
|
||||
@@ -260,7 +260,7 @@ class ExecutableJarSmokeTestIT {
|
||||
System.out.println("[SMOKE-TEST-INVALID] Exit code: " + exitCode);
|
||||
System.out.println("[SMOKE-TEST-INVALID] Subprocess stdout/stderr:\n" + outputText);
|
||||
|
||||
assertEquals(2, exitCode, "Invalid configuration should return exit code 2. Output was: " + outputText);
|
||||
assertEquals(1, exitCode, "Invalid configuration should return exit code 1. Output was: " + outputText);
|
||||
|
||||
// Verify error output indicates configuration failure
|
||||
assertTrue(
|
||||
|
||||
Reference in New Issue
Block a user