Skip to content

Commit

Permalink
fix(venom): take extracted ts.vars only once (#166)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Aug 21, 2018
1 parent 6cb6949 commit 9ec4044
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions process.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func (v *Venom) Parse(path []string, exclude []string) error {
if err != nil {
return err
}
for k := range ts.Vars {
textractedVars = append(textractedVars, k)
}
for _, k := range tvars {
var found bool
for i := 0; i < len(missingVars); i++ {
Expand Down
6 changes: 1 addition & 5 deletions process_testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ func (v *Venom) parseTestCase(ts *TestSuite, tc *TestCase) ([]string, []string,
defer tcc.Close()

vars := []string{}
extractedVars := make([]string, 0, len(ts.Vars))

for k := range ts.Vars {
extractedVars = append(extractedVars, k)
}
extractedVars := []string{}

for stepNumber, stepIn := range tc.TestSteps {
step, erra := ts.Templater.ApplyOnStep(stepNumber, stepIn)
Expand Down

0 comments on commit 9ec4044

Please sign in to comment.