@@ -11,6 +11,12 @@ uploadDirectory("test", "simple", "v1", src, staging=info$staging, url=info$url)
1111uploadDirectory(" test" , " simple" , " v2" , src , staging = info $ staging , url = info $ url )
1212uploadDirectory(" test" , " simple" , " v3" , src , staging = info $ staging , url = info $ url )
1313
14+ .sort_array_of_actions <- function (x ) {
15+ x <- x [order(x $ path ),]
16+ rownames(x ) <- NULL
17+ x
18+ }
19+
1420test_that(" rerouting functions work as expected" , {
1521 actions <- rerouteLinks(list (list (project = " test" , asset = " simple" , version = " v1" )), staging = info $ staging , url = info $ url , dry.run = TRUE )
1622 expect_true(all(" test/simple/v1/foo" == actions $ source ))
@@ -21,6 +27,6 @@ test_that("rerouting functions work as expected", {
2127 expect_true(Sys.readlink(file.path(info $ registry , " test/simple/v2/foo" )) != " " )
2228
2329 actions2 <- rerouteLinks(list (list (project = " test" , asset = " simple" , version = " v1" )), staging = info $ staging , url = info $ url )
24- expect_identical(actions , actions2 )
30+ expect_identical(.sort_array_of_actions( actions ), .sort_array_of_actions( actions2 ) )
2531 expect_true(Sys.readlink(file.path(info $ registry , " test/simple/v2/foo" )) == " " )
2632})
0 commit comments