(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestDetermineRootAndSubPath(t *testing.T) { |
| 71 | c := qt.New(t) |
| 72 | |
| 73 | var client *cloudFrontClient |
| 74 | |
| 75 | check := func(bucketPath, originPath, expectWebContextRoot, expectSubPath string) { |
| 76 | t.Helper() |
| 77 | s1, s2 := client.determineRootAndSubPath(bucketPath, originPath) |
| 78 | c.Assert(s1, qt.Equals, expectWebContextRoot) |
| 79 | c.Assert(s2, qt.Equals, expectSubPath) |
| 80 | } |
| 81 | |
| 82 | check("temp/forsale", "temp", "/forsale", "temp") |
| 83 | check("/temp/forsale/", "temp", "/forsale", "temp") |
| 84 | check("root", "root", "/", "root") |
| 85 | check("root", "/root", "/", "root") |
| 86 | } |
| 87 | |
| 88 | func TestPathsToInvalidationBatch(t *testing.T) { |
| 89 | c := qt.New(t) |
nothing calls this directly
no test coverage detected