Skip to content

Commit 6154246

Browse files
committed
fixing windows issues
1 parent a75e4a5 commit 6154246

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index/rolodex_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,15 +2251,16 @@ func TestRolodex_NestedSubdirRelativeRefResolution(t *testing.T) {
22512251
refs := rolodex.GetAllReferences()
22522252

22532253
// Verify the path file reference was resolved
2254-
pathRef := "'paths/user.yaml#/user_path'"
2254+
// Use filepath.Join to get the correct path separator for the platform
2255+
pathRef := filepath.Join("paths", "user.yaml")
22552256
found := false
22562257
for ref := range refs {
2257-
if strings.Contains(ref, "paths/user.yaml") {
2258+
if strings.Contains(ref, pathRef) {
22582259
found = true
22592260
break
22602261
}
22612262
}
2262-
assert.True(t, found, "expected to find path reference to paths/user.yaml, refs: %v", refs)
2263+
assert.True(t, found, "expected to find path reference to %s, refs: %v", pathRef, refs)
22632264

22642265
// Check that there are no errors - if the /openapi/ segment was lost,
22652266
// we would see file not found errors for the component references

0 commit comments

Comments
 (0)