choreo 0.12.0

DSL for BDD type testing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This test checks that timeout correctly terminates a process (sleep) that exceeds the specified duration, and verifies it exits with the correct status code.
feature "Timeout Utility"
actors: Terminal

scenario "Terminate a long-running process" {
    test TimeoutKillsProcess "timeout terminates a process that runs too long" {
        given:
            Test can_start
        when:
            # This command will be killed after 1 second.
            Terminal run "timeout 1 sleep 5"
        then:
            Terminal last_command failed
            # `timeout` returns 124 when it kills the child process.
            Terminal last_command exit_code_is 124
    }
}