Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii Nasinnyk <[email protected]>
  • Loading branch information
anasinnyk committed Jun 14, 2019
1 parent c460957 commit f3298b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions server/events/project_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func TestDefaultProjectCommandRunner_Plan(t *testing.T) {

Assert(t, res.PlanSuccess != nil, "exp plan success")
Equals(t, "https://lock-key", res.PlanSuccess.LockURL)
Equals(t, "run\napply\nplan\ninit\nenv", res.PlanSuccess.TerraformOutput)
Equals(t, "run\napply\nplan\ninit", res.PlanSuccess.TerraformOutput)

expSteps := []string{"run", "apply", "plan", "init", "var", "env"}
for _, step := range expSteps {
Expand Down Expand Up @@ -251,7 +251,7 @@ func TestDefaultProjectCommandRunner_Apply(t *testing.T) {
},
},
expSteps: []string{"run", "apply", "plan", "init", "env"},
expOut: "run\napply\nplan\ninit\nenv",
expOut: "run\napply\nplan\ninit",
},
}

Expand Down
18 changes: 9 additions & 9 deletions server/events/yaml/raw/step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ func TestStep_Validate(t *testing.T) {
expErr: "",
},
{
description: "var",
description: "env",
input: raw.Step{
Env: EnvType{
"var": {
"env": {
"name": "test",
"command": "echo 123",
},
Expand Down Expand Up @@ -257,7 +257,7 @@ func TestStep_Validate(t *testing.T) {
expErr: "step element can only contain a single key, found 2: key1,key2",
},
{
description: "multiple keys in var",
description: "multiple keys in env",
input: raw.Step{
Env: EnvType{
"key1": nil,
Expand Down Expand Up @@ -286,7 +286,7 @@ func TestStep_Validate(t *testing.T) {
expErr: "\"invalid\" is not a valid step type",
},
{
description: "invalid key in var",
description: "invalid key in env",
input: raw.Step{
Env: EnvType{
"invalid": nil,
Expand Down Expand Up @@ -327,22 +327,22 @@ func TestStep_Validate(t *testing.T) {
expErr: "built-in steps only support a single extra_args key, found 2: invalid,invalid2",
},
{
description: "incorrect keys in var",
description: "incorrect keys in env",
input: raw.Step{
Env: EnvType{
"var": {
"env": {
"abc": "",
"invalid2": "",
},
},
},
expErr: "built-in steps only support two keys name and command, found \"abc\" in step var",
expErr: "built-in steps only support two keys name and command, found \"abc\" in step env",
},
{
description: "non two keys in var",
description: "non two keys in env",
input: raw.Step{
Env: EnvType{
"var": {
"env": {
"invalid": "",
},
},
Expand Down

0 comments on commit f3298b2

Please sign in to comment.