Skip to content

Commit 2e5766a

Browse files
committed
change disable to skip
1 parent a1e89a4 commit 2e5766a

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

examples/commander.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ tests:
2323

2424
it should skip:
2525
command: echo hello
26-
disable: true
26+
skip: true

pkg/runtime/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (r *Runner) Run(tests []TestCase) <-chan TestResult {
3232

3333
for t := range tests {
3434
// If test is disabled skip it
35-
if t.Disable {
35+
if t.Skip {
3636
tr := TestResult{TestCase: t, Skipped: true}
3737
out <- tr
3838
continue

pkg/runtime/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type TestCase struct {
5353
Result CommandResult
5454
Nodes []string
5555
FileName string
56-
Disable bool
56+
Skip bool
5757
}
5858

5959
//GlobalTestConfig represents the configuration for a test

pkg/runtime/runtime_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func Test_RuntimeWithRetriesAndInterval(t *testing.T) {
7171

7272
func Test_RuntimeWithSkip(t *testing.T) {
7373
s := getExampleTestCases()
74-
s[0].Disable = true
74+
s[0].Skip = true
7575

7676
r := getRuntime()
7777
got := r.Start(s)

pkg/suite/yaml_suite.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type YAMLTest struct {
4747
Stdout interface{} `yaml:"stdout,omitempty"`
4848
Stderr interface{} `yaml:"stderr,omitempty"`
4949
Config YAMLTestConfigConf `yaml:"config,omitempty"`
50-
Disable bool `yaml:"disable,omitempty"`
50+
Skip bool `yaml:"skip,omitempty"`
5151
}
5252

5353
// ParseYAML parses the Suite from a yaml byte slice
@@ -119,7 +119,7 @@ func convertYAMLSuiteConfToTestCases(conf YAMLSuiteConf, fileName string) []runt
119119
},
120120
Nodes: t.Config.Nodes,
121121
FileName: fileName,
122-
Disable: t.Disable,
122+
Skip: t.Skip,
123123
})
124124
}
125125

@@ -154,7 +154,7 @@ func (y *YAMLSuiteConf) UnmarshalYAML(unmarshal func(interface{}) error) error {
154154
Stdout: y.convertToExpectedOut(v.Stdout),
155155
Stderr: y.convertToExpectedOut(v.Stderr),
156156
Config: y.mergeConfigs(v.Config, params.Config),
157-
Disable: v.Disable,
157+
Skip: v.Skip,
158158
}
159159

160160
// Set key as command, if command property was empty

pkg/suite/yaml_suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ tests:
8282
exit-code: 0
8383
stdout: hello
8484
stderr: anything
85-
disable: true
85+
skip: true
8686
`)
8787
got := ParseYAML(yaml, "")
8888
tests := got.GetTests()
@@ -93,7 +93,7 @@ tests:
9393
assert.Equal(t, "it should print hello", tests[0].Title)
9494
assert.Equal(t, "hello", tests[0].Expected.Stdout.Contains[0])
9595
assert.Equal(t, "anything", tests[0].Expected.Stderr.Contains[0])
96-
assert.True(t, tests[0].Disable)
96+
assert.True(t, tests[0].Skip)
9797
}
9898

9999
func TestYAMLConfig_UnmarshalYAML_ShouldConvertStdoutToExpectedOut(t *testing.T) {

0 commit comments

Comments
 (0)