[Flaky Test] `TestIsPathIn` and `TestResolveSymlinks` fail on some Windows versions
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 364
Description
## Flaky Test
* **Test Name:** `TestIsPathIn` and `TestResolveSymlinks`
* **Link:** https://github.com/elastic/beats/blob/d714fde848f7b47804cb10dc9979696874bb7a56/x-pack/filebeat/input/internal/httplog/roundtripper_test.go#L211 https://github.com/elastic/beats/blob/d714fde848f7b47804cb10dc9979696874bb7a56/x-pack/filebeat/input/internal/httplog/roundtripper_test.go#L237
* **Branch:** 9.2
* **Notes:** It is only failing on some Windows versions
### Stack Trace
When running the tests on the `win2019` Vagrant VM. 9.2 Branch
```
PS C:\devel\beats\x-pack\filebeat\input\internal\httplog> go test -count=1 ./...
--- FAIL: TestIsPathIn (0.01s)
--- FAIL: TestIsPathIn/symlink_traversal_no_file (0.00s)
roundtripper_test.go:211: unexpected result from IsPathIn: got:true want:false
--- FAIL: TestIsPathIn/symlink_traversal_with_file (0.00s)
roundtripper_test.go:211: unexpected result from IsPathIn: got:true want:false
--- FAIL: TestIsPathIn/symlink_traversal_prefix_deep_file (0.00s)
roundtripper_test.go:211: unexpected result from IsPathIn: got:true want:false
--- FAIL: TestIsPathIn/symlink_traversal_postfix_deep_file (0.00s)
roundtripper_test.go:211: unexpected result from IsPathIn: got:true want:false
--- FAIL: TestResolveSymlinks (0.00s)
--- FAIL: TestResolveSymlinks/testdata/root/outside_root (0.00s)
roundtripper_test.go:237: unexpected result: got "testdata\\root\\outside_root", want "testdata\\outside_root"
--- FAIL: TestResolveSymlinks/testdata/root/outside_root/target-*.log (0.00s)
roundtripper_test.go:237: unexpected result: got "testdata\\root\\outside_root\\target-*.log", want "testdata\\outside_root\\target-*.log"
--- FAIL: TestResolveSymlinks/testdata/root/path/outside_root/target-*.log (0.00s)
roundtripper_test.go:237: unexpected result: got "testdata\\root\\path\\outside_root\\target-*.log", want "testdata\\outside_root\\target-*.log"
--- FAIL: TestResolveSymlinks/testdata/root/outside_root/path/target-*.log (0.00s)
roundtripper_test.go:237: unexpected result: got "testdata\\root\\outside_root\\path\\target-*.log", want "testdata\\outside_root\\path\\target-*.log"
FAIL
FAIL github.com/elastic/beats/v7/x-pack/filebeat/input/internal/httplog 0.530s
FAIL
```
Commit: 8cfb111614060b95e8363322d8ff70636d08bedf
Contributor guide
Assessment
This issue has not been assessed yet.