Skip to content

Commit

Permalink
fix(executor/http): default assertion (#282)
Browse files Browse the repository at this point in the history
executors rabbit/ovhapi fixed too

close #249

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored Oct 12, 2020
1 parent 196336a commit 8f75de3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ type Result struct {

// GetDefaultAssertions return default assertions for this executor
// Optional
func (Executor) GetDefaultAssertions() venom.StepAssertions {
func (Executor) GetDefaultAssertions() *venom.StepAssertions {
return venom.StepAssertions{Assertions: []string{"result.code ShouldEqual 0"}}
}

Expand Down
5 changes: 2 additions & 3 deletions executors/http/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ func (Executor) ZeroValueResult() venom.ExecutorResult {
}

// GetDefaultAssertions return default assertions for this executor
// Optional
func (Executor) GetDefaultAssertions() venom.StepAssertions {
return venom.StepAssertions{Assertions: []string{"result.statuscode ShouldEqual 200"}}
func (Executor) GetDefaultAssertions() *venom.StepAssertions {
return &venom.StepAssertions{Assertions: []string{"result.statuscode ShouldEqual 200"}}
}

// Run execute TestStep
Expand Down
5 changes: 2 additions & 3 deletions executors/ovhapi/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ func (Executor) ZeroValueResult() venom.ExecutorResult {
}

// GetDefaultAssertions return default assertions for this executor
// Optional
func (Executor) GetDefaultAssertions() venom.StepAssertions {
return venom.StepAssertions{Assertions: []string{"result.statuscode ShouldEqual 200"}}
func (Executor) GetDefaultAssertions() *venom.StepAssertions {
return &venom.StepAssertions{Assertions: []string{"result.statuscode ShouldEqual 200"}}
}

// Run execute TestStep
Expand Down
4 changes: 2 additions & 2 deletions executors/rabbitmq/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func (Executor) ZeroValueResult() venom.ExecutorResult {
}

// GetDefaultAssertions return default assertions for type exec
func (Executor) GetDefaultAssertions() venom.StepAssertions {
return venom.StepAssertions{Assertions: []string{"result.code ShouldEqual 0"}}
func (Executor) GetDefaultAssertions() *venom.StepAssertions {
return &venom.StepAssertions{Assertions: []string{"result.code ShouldEqual 0"}}
}

// Run execute TestStep of type exec
Expand Down

0 comments on commit 8f75de3

Please sign in to comment.