Skip to content

Commit 7488379

Browse files
committed
Fix integration tests for windows
* the subdirectory/filename tag in Windows has a different separator, match on both that and the linux separator. * The trailing space appears to be removed by `os.Mkdir()` on Windows, remove it to make that test pass, as we already test that a space is ignored earlier in that string.
1 parent 7578d10 commit 7488379

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integration/syslog_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ var _ = Describe("Blackbox", func() {
215215

216216
var message *sl.Message
217217
Eventually(inbox.Messages, "5s").Should(Receive(&message))
218-
Expect(message.Content).To(ContainSubstring(tagName + "/" + logfileName))
218+
Expect(message.Content).To(MatchRegexp(tagName + `[/\\]` + logfileName))
219219

220220
blackboxRunner.Stop()
221221
})
@@ -249,7 +249,7 @@ var _ = Describe("Blackbox", func() {
249249
blackboxRunner.Stop()
250250
})
251251
It("removes all characters that are not between ASCII 33 - 126 from the tag name", func() {
252-
specialCharsName := "ab c§d "
252+
specialCharsName := "ab c§d"
253253
expectedNoSpecialCharsName := "abcd"
254254

255255
err := os.Mkdir(filepath.Join(logDir, specialCharsName), os.ModePerm)

0 commit comments

Comments
 (0)