MCPcopy Create free account
hub / github.com/commander-cli/commander / Test_ValidateExitCodeShouldFail

Function Test_ValidateExitCodeShouldFail

pkg/runtime/validator_test.go:54–66  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func Test_ValidateExitCodeShouldFail(t *testing.T) {
55 test := getExampleTest()
56 test.Expected.Stdout = ExpectedOut{}
57 test.Expected.Stderr = ExpectedOut{}
58 test.Result = CommandResult{
59 ExitCode: 1,
60 }
61
62 got := Validate(test)
63
64 assert.False(t, got.ValidationResult.Success)
65 assert.Equal(t, "ExitCode", got.FailedProperty)
66}
67
68func Test_ValidateExpectedOut_Contains_Fails(t *testing.T) {
69 value := `test`

Callers

nothing calls this directly

Calls 2

getExampleTestFunction · 0.85
ValidateFunction · 0.85

Tested by

no test coverage detected