Skip to content

Commit

Permalink
Fix interpolate tests for windows
Browse files Browse the repository at this point in the history
* Using `Say` matcher converts the argument to regexp, which fails
when it contains a forward slash such as in a windows filepath
* Use '=' between argument to avoid `/relative` being parsed as an
option
  • Loading branch information
mdelillo committed Oct 12, 2018
1 parent eb7e039 commit 7b5b9ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/interpolate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static-value: a normal string`
)
})
It("prints the values of credential names derived from the prefix, unless the cred paths start with /", func() {
session = runCommand("interpolate", "-f", templateFile.Name(), "-p", "/relative")
session = runCommand("interpolate", "-f", templateFile.Name(), "-p=/relative")
Eventually(session).Should(gexec.Exit(0))
Expect(string(session.Out.Contents())).To(MatchYAML(`
full-certificate-cred:
Expand Down Expand Up @@ -182,7 +182,7 @@ static-value: a normal string
It("prints and errors to require data in the template", func() {
session := runCommand("interpolate", "-f", templateFile.Name())
Eventually(session).Should(gexec.Exit(1), "interpolate should have failed")
Expect(session.Err).To(Say(fmt.Sprintf("Error: %s was an empty file", templateFile.Name())))
Expect(session.Err.Contents()).To(ContainSubstring(fmt.Sprintf("Error: %s was an empty file", templateFile.Name())))
})
})

Expand Down

0 comments on commit 7b5b9ad

Please sign in to comment.