Skip to content

Commit 21805f1

Browse files
authored
Merge branch 'main' into enable-service-debug
2 parents 6ac7278 + 371db6d commit 21805f1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Tests/CLITests/Subcommands/Containers/TestCLIExec.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,15 @@ class TestCLIExecCommand: CLITest {
122122
do {
123123
_ = try doExec(name: name, cmd: ["sleep", "infinity"])
124124
} catch CLIError.executionFailed(let message) {
125-
#expect(message.contains("is not running"))
125+
// There's no nice way to check fail reason here
126+
#expect(message.contains("is not running"), "expected container is not running if exec failed")
127+
}
128+
129+
// Give time for the exec (or start) error handling settles down
130+
sleep(1)
131+
#expect(throws: Never.self, "expected the container remains") {
132+
try getContainerStatus(name)
126133
}
127-
#expect(try getContainerStatus(name) == "stopped")
128134
}
129135
}
130136
}

0 commit comments

Comments
 (0)