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

Function TestRuntime_WithRetries

pkg/runtime/runtime_test.go:32–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestRuntime_WithRetries(t *testing.T) {
33 s := getExampleTestCases()
34 s[0].Command.Retries = 3
35 s[0].Command.Cmd = "echo fail"
36
37 r := getRuntime()
38 got := r.Start(s)
39
40 var counter = 0
41 for _, r := range got.TestResults {
42 counter++
43 assert.False(t, r.ValidationResult.Success)
44 assert.Equal(t, 3, r.Tries)
45 }
46
47 assert.Equal(t, 1, counter)
48}
49
50func Test_AlphabeticalOrder(t *testing.T) {
51 tests := []TestCase{

Callers

nothing calls this directly

Calls 3

getExampleTestCasesFunction · 0.85
getRuntimeFunction · 0.85
StartMethod · 0.80

Tested by

no test coverage detected