From 017ce609697d99c58df7e4e4cb23b523760b29a8 Mon Sep 17 00:00:00 2001 From: Robert Ashton Date: Thu, 30 Nov 2023 15:16:06 +0000 Subject: [PATCH 1/2] Pair back impl to act as shared drive remote --- DESCRIPTION | 7 +- NAMESPACE | 2 +- R/orderly.R | 118 +++------ R/tools.R | 3 + inst/WORDLIST | 7 +- man/orderly_remote_sharedrive.Rd | 41 ++++ man/orderly_remote_sharepoint.Rd | 56 ----- tests/testthat/helper-orderly.sharedrive.R | 39 +++ tests/testthat/test-orderly.R | 271 ++++++--------------- 9 files changed, 202 insertions(+), 342 deletions(-) create mode 100644 man/orderly_remote_sharedrive.Rd delete mode 100644 man/orderly_remote_sharepoint.Rd create mode 100644 tests/testthat/helper-orderly.sharedrive.R diff --git a/DESCRIPTION b/DESCRIPTION index 578b6e7..0ae337c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,13 +14,12 @@ Encoding: UTF-8 LazyData: true Language: en-GB Imports: + cli, orderly1 (>= 1.7.0), - spud (>= 0.1.5), zip Suggests: - mockery, + openssl, testthat Remotes: - reside-ic/spud, orderly1=vimc/orderly@vimc-7135 -RoxygenNote: 7.0.2 +RoxygenNote: 7.2.3 diff --git a/NAMESPACE b/NAMESPACE index d95f9a9..40aa953 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,3 +1,3 @@ # Generated by roxygen2: do not edit by hand -export(orderly_remote_sharepoint) +export(orderly_remote_sharedrive) diff --git a/R/orderly.R b/R/orderly.R index 060f761..6e81caa 100644 --- a/R/orderly.R +++ b/R/orderly.R @@ -1,4 +1,4 @@ -##' Implements an orderly "remote" using Sharepoint as a backend. Use +##' Implements an orderly "remote" using a shared drive as a backend. Use ##' this within an \code{orderly_config.yml} configuration. ##' ##' A configuration might look like: @@ -6,128 +6,72 @@ ##' \preformatted{ ##' remote: ##' real: -##' driver: orderly.sharepoint::orderly_remote_sharepoint +##' driver: orderly.sharedrive::orderly_remote_sharedrive ##' args: -##' url: https://example.sharepoint.com -##' site: mysite -##' path: Shared Documents/orderly/real +##' path: ~/path/to/network/drive ##' } ##' -##' which would create a remote called \code{real}, using your group's -##' Sharepoint hosted at \code{https://example.sharepoint.com}, on -##' site \code{mysite} and within that site using path \code{Shared -##' Documents/orderly/real}. -##' -##' Currently authentication is interactive, or uses the values of -##' environment variables \code{SHAREPOINT_USERNAME} and -##' \code{SHAREPOINT_PASS}. Once we expose richer authentication -##' approaches in spud that will be exposed here (RESIDE-162). +##' which would create a remote called \code{real}, at the file path +##' specified. This can be a network drive or a one drive synced drive. ##' ##' This function is not intended to be used interactively ##' -##' @title Create an orderly remote based on Sharepoint -##' -##' @param url Sharepoint URL -##' -##' @param site Sharepoint "site" +##' @title Create an orderly remote based at a path ##' -##' @param path Path within the Sharepoint site. In our experience -##' these often start with \code{Shared Documents} but your setup -##' may vary. +##' @param path Path to use as a remote ##' ##' @param name Friendly name for the remote ##' -##' @return An \code{orderly_remote_sharepoint} object -##' @return An \code{orderly_remote_sharepoint} object, designed to be +##' @return An \code{orderly_remote_sharedrive} object +##' @return An \code{orderly_remote_sharedrive} object, designed to be ##' used by orderly. This function should however not generally be ##' called by users directly, as it should be used within ##' \code{orderly_config.yml} ##' @export -orderly_remote_sharepoint <- function(url, site, path, name = NULL) { - client <- orderly_sharepoint_client(url) - folder <- orderly_sharepoint_folder(client, site, path) - orderly_remote_sharepoint_$new(folder, name) -} - - -## Seems hard to mock the whole class out, which I think validates my -## general approach of exposing free constructor! -## https://github.com/r-lib/mockery/issues/21 -orderly_sharepoint_client <- function(url) { - spud::sharepoint$new(url) # nocov +orderly_remote_sharedrive <- function(path, name = NULL) { + orderly_remote_sharedrive_$new(path, name) } -orderly_sharepoint_folder <- function(client, site, path) { - folder <- tryCatch( - client$folder(site, path, verify = TRUE), - error = function(e) - stop(sprintf("Error reading from %s:%s - %s", - site, path, e$message), call. = FALSE)) - path <- "orderly.sharepoint" - exists <- tryCatch({ - folder$download(path) - TRUE - }, error = function(e) FALSE) - if (exists) { - return(folder) - } - if (nrow(folder$list()) > 0L) { - stop(sprintf( - "Directory %s:%s cannot be used for orderly; contains other files", - site, path)) - } - tmp <- tempfile() - on.exit(unlink(tmp)) - writeLines("orderly.sharepoint", tmp) - folder$upload(tmp, path) - folder$create("archive") - folder -} - - -orderly_remote_sharepoint_ <- R6::R6Class( - "orderly_remote_sharepoint", +orderly_remote_sharedrive_ <- R6::R6Class( + "orderly_remote_sharedrive", cloneable = FALSE, public = list( - folder = NULL, + path = NULL, + archive_root = NULL, name = NULL, - initialize = function(folder, name = NULL) { - self$folder <- folder + initialize = function(path, name = NULL) { + self$path <- path + self$archive_root <- file.path(path, "archive") self$name <- name }, list_reports = function() { - sort(self$folder$folders("archive")$name) + basename(list.dirs(self$archive_root, recursive = FALSE)) }, list_versions = function(name) { - sort(self$folder$files(file.path("archive", name))$name) + sort(list.files(file.path(self$archive_root, name))) }, push = function(path) { path_meta <- file.path(path, "orderly_run.rds") - stopifnot(file.exists(path_meta)) - - zip <- tempfile(fileext = ".zip") - zip_dir(path, zip) - on.exit(unlink(zip)) + if (!file.exists(path_meta)) { + cli::cli_abort("Can't push report at path '{path_meta}', report doesn't exist.") + } dat <- readRDS(path_meta) name <- dat$meta$name id <- dat$meta$id - self$folder$create(file.path("archive", name)) - self$folder$upload(zip, file.path("archive", name, id)) + dir.create(file.path(self$archive_root, name), FALSE, TRUE) + zip_dir(path, file.path(self$archive_root, name, id)) }, pull = function(name, id) { - zip <- tempfile(fileext = ".zip") - on.exit(unlink(zip)) - zip <- self$folder$download(file.path("archive", name, id), zip) - unzip_archive(zip, name, id) + unzip_archive(file.path(self$archive_root, name, id), name, id) }, metadata = function(name, id) { @@ -136,22 +80,22 @@ orderly_remote_sharepoint_ <- R6::R6Class( }, run = function(...) { - stop("'orderly_remote_sharepoint' remotes do not run") + stop("'orderly_remote_sharedrive' remotes do not run") }, kill = function(...) { - stop("'orderly_remote_sharepoint' remotes do not support kill") + stop("'orderly_remote_sharedrive' remotes do not support kill") }, url_report = function(name, id) { - stop("'orderly_remote_sharepoint' remotes do not support urls") + stop("'orderly_remote_sharedrive' remotes do not support urls") }, bundle_pack = function(...) { - stop("'orderly_remote_sharepoint' remotes do not support bundles") + stop("'orderly_remote_sharedrive' remotes do not support bundles") }, bundle_import = function(...) { - stop("'orderly_remote_sharepoint' remotes do not support bundles") + stop("'orderly_remote_sharedrive' remotes do not support bundles") } )) diff --git a/R/tools.R b/R/tools.R index 01720e6..76b1270 100644 --- a/R/tools.R +++ b/R/tools.R @@ -1,6 +1,9 @@ ## NOTE: duplicated out of orderlyweb for now - it's not clear where ## this really belongs. See VIMC-3771 unzip_archive <- function(zip, name, id) { + if (!file.exists(zip)) { + cli::cli_abort("Can't pull archive from '{zip}', file doesn't exist.") + } dest <- tempfile() res <- utils::unzip(zip, exdir = dest) diff --git a/inst/WORDLIST b/inst/WORDLIST index 10f555a..e4c8194 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,5 +1,6 @@ -Sharepoint -Sharepoint's +Sharedrive codecov io -sharepoint +sharedrive +vimc +onedrive diff --git a/man/orderly_remote_sharedrive.Rd b/man/orderly_remote_sharedrive.Rd new file mode 100644 index 0000000..3664f3b --- /dev/null +++ b/man/orderly_remote_sharedrive.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/orderly.R +\name{orderly_remote_sharedrive} +\alias{orderly_remote_sharedrive} +\title{Create an orderly remote based at a path} +\usage{ +orderly_remote_sharedrive(path, name = NULL) +} +\arguments{ +\item{path}{Path to use as a remote} + +\item{name}{Friendly name for the remote} +} +\value{ +An \code{orderly_remote_sharedrive} object + +An \code{orderly_remote_sharedrive} object, designed to be + used by orderly. This function should however not generally be + called by users directly, as it should be used within + \code{orderly_config.yml} +} +\description{ +Implements an orderly "remote" using a shared drive as a backend. Use +this within an \code{orderly_config.yml} configuration. +} +\details{ +A configuration might look like: + +\preformatted{ +remote: + real: + driver: orderly.sharedrive::orderly_remote_sharedrive + args: + path: ~/path/to/network/drive +} + +which would create a remote called \code{real}, at the file path +specified. This can be a network drive or a one drive synced drive. + +This function is not intended to be used interactively +} diff --git a/man/orderly_remote_sharepoint.Rd b/man/orderly_remote_sharepoint.Rd deleted file mode 100644 index 585dfc6..0000000 --- a/man/orderly_remote_sharepoint.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/orderly.R -\name{orderly_remote_sharepoint} -\alias{orderly_remote_sharepoint} -\title{Create an orderly remote based on Sharepoint} -\usage{ -orderly_remote_sharepoint(url, site, path, name = NULL) -} -\arguments{ -\item{url}{Sharepoint URL} - -\item{site}{Sharepoint "site"} - -\item{path}{Path within the Sharepoint site. In our experience -these often start with \code{Shared Documents} but your setup -may vary.} - -\item{name}{Friendly name for the remote} -} -\value{ -An \code{orderly_remote_sharepoint} object - -An \code{orderly_remote_sharepoint} object, designed to be - used by orderly. This function should however not generally be - called by users directly, as it should be used within - \code{orderly_config.yml} -} -\description{ -Implements an orderly "remote" using Sharepoint as a backend. Use -this within an \code{orderly_config.yml} configuration. -} -\details{ -A configuration might look like: - -\preformatted{ -remote: - real: - driver: orderly.sharepoint::orderly_remote_sharepoint - args: - url: https://example.sharepoint.com - site: mysite - path: Shared Documents/orderly/real -} - -which would create a remote called \code{real}, using your group's -Sharepoint hosted at \code{https://example.sharepoint.com}, on -site \code{mysite} and within that site using path \code{Shared -Documents/orderly/real}. - -Currently authentication is interactive, or uses the values of -environment variables \code{SHAREPOINT_USERNAME} and -\code{SHAREPOINT_PASS}. Once we expose richer authentication -approaches in spud that will be exposed here (RESIDE-162). - -This function is not intended to be used interactively -} diff --git a/tests/testthat/helper-orderly.sharedrive.R b/tests/testthat/helper-orderly.sharedrive.R new file mode 100644 index 0000000..e8af225 --- /dev/null +++ b/tests/testthat/helper-orderly.sharedrive.R @@ -0,0 +1,39 @@ +#' Set up orderly for tests +#' +#' This will create an orderly instance with 2 run reports +#' * example which has been run twice +#' * example2 which has also been run twice +#' +#' @param add_remote If true then will setup a sharedrive remote and push +#' all reports to it. +#' +#' @return The path to the orderly instance +setup_orderly <- function(add_remote = TRUE) { + path <- orderly1::orderly_example("minimal") + example1_1 <- orderly1::orderly_run("example", root = path, echo = FALSE) + p1 <- orderly1::orderly_commit(example1_1, root = path) + example1_2 <- orderly1::orderly_run("example", root = path, echo = FALSE) + p2 <- orderly1::orderly_commit(example1_2, root = path) + example2_1 <- orderly1::orderly_run("example2", root = path, echo = FALSE) + p3 <- orderly1::orderly_commit(example2_1, root = path) + example2_2 <- orderly1::orderly_run("example2", root = path, echo = FALSE) + p4 <- orderly1::orderly_commit(example2_2, root = path) + + remote_path <- NULL + if (add_remote) { + remote_path <- tempfile() + + cl <- orderly_remote_sharedrive(remote_path) + res1 <- cl$push(p1) + res2 <- cl$push(p2) + res3 <- cl$push(p3) + res4 <- cl$push(p4) + } + + list( + root = path, + remote = remote_path, + report_paths = list(example = c(p1, p2), + example2 = c(p3, p4)) + ) +} diff --git a/tests/testthat/test-orderly.R b/tests/testthat/test-orderly.R index 1f8f87a..395e935 100644 --- a/tests/testthat/test-orderly.R +++ b/tests/testthat/test-orderly.R @@ -1,235 +1,124 @@ -context("orderly") - -test_that("list_reports calls folder$folders('archive')", { - folder <- list(folders = mockery::mock(list(name = c("a", "b", "c")))) - cl <- orderly_remote_sharepoint_$new(folder) - expect_equal(cl$list_reports(), c("a", "b", "c")) - mockery::expect_called(folder$folders, 1) - expect_equal(mockery::mock_args(folder$folders)[[1]], list("archive")) +test_that("push", { + paths <- setup_orderly(add_remote = FALSE) + + remote_path <- tempfile() + cl <- orderly_remote_sharedrive(remote_path) + + expect_equal(cl$list_reports(), character(0)) + + expect_error(cl$push("/not/a/path"), "Can't push report at path") + + res <- cl$push(paths$report_paths$example[1]) + + expect_equal(cl$list_reports(), "example") + expect_length(cl$list_versions("example"), 1) + + example <- file.path(remote_path, "archive", "example") + expect_true(dir.exists(example)) + expect_true(file.exists(file.path( + example, basename(paths$report_paths$example[1])))) + + res <- cl$push(paths$report_paths$example[2]) + expect_equal(cl$list_reports(), "example") + expect_length(cl$list_versions("example"), 2) + expect_true(file.exists(file.path( + remote_path, "archive", "example", + basename(paths$report_paths$example[2])))) + + res <- cl$push(paths$report_paths$example2[1]) + + expect_equal(cl$list_reports(), c("example", "example2")) + expect_length(cl$list_versions("example2"), 1) + + example2 <- file.path(remote_path, "archive", "example2") + expect_true(dir.exists(example2)) + expect_true(file.exists(file.path(example2, + basename(paths$report_paths$example2[1])))) +}) + +test_that("list_reports", { + paths <- setup_orderly() + + cl <- orderly_remote_sharedrive(paths$remote) + expect_equal(cl$list_reports(), c("example", "example2")) }) -test_that("list_versions calls folder$files('archive/')", { - folder <- list(files = mockery::mock(list(name = c("a", "b", "c")))) - cl <- orderly_remote_sharepoint_$new(folder) - expect_equal(cl$list_versions("x"), c("a", "b", "c")) - mockery::expect_called(folder$files, 1) - expect_equal(mockery::mock_args(folder$files)[[1]], list("archive/x")) +test_that("list_versions", { + paths <- setup_orderly() + + cl <- orderly_remote_sharedrive(paths$remote) + expect_length(cl$list_versions("example"), 2) + + expect_equal(cl$list_versions("unknown"), character(0)) }) test_that("pull", { - path <- orderly1::orderly_example("minimal") - id <- orderly1::orderly_run("example", root = path, echo = FALSE) - p <- orderly1::orderly_commit(id, root = path) - zip <- zip_dir(p) + paths <- setup_orderly() + cl <- orderly_remote_sharedrive(paths$remote) - folder <- list(download = mockery::mock(zip)) - cl <- orderly_remote_sharepoint_$new(folder) - res <- cl$pull("example", id) + res <- cl$pull("example", basename(paths$report_paths$example[1])) expect_true(file.exists(res)) expect_true(file.info(res)$isdir) - expect_setequal(dir(res), dir(p)) - - mockery::expect_called(folder$download, 1) - args <- mockery::mock_args(folder$download)[[1]] - expect_equal(args[[1]], file.path("archive/example", id)) - expect_match(args[[2]], "\\.zip$") - expect_equal(normalizePath(dirname(args[[2]]), mustWork = TRUE), - normalizePath(tempdir(), mustWork = TRUE)) + expect_setequal(dir(res), dir(paths$report_paths$example[1])) + expect_setequal(openssl::md5(dir(res)), + openssl::md5(dir(paths$report_paths$example[1]))) }) + +test_that("useful error returned when trying to pull missing report", { + cl <- orderly_remote_sharedrive(tempfile()) + expect_error(cl$pull("thing", "123"), + "file doesn't exist.") +}) + + test_that("metadata", { - path <- orderly1::orderly_example("minimal") - id <- orderly1::orderly_run("example", root = path, echo = FALSE) - p <- orderly1::orderly_commit(id, root = path) - zip <- zip_dir(p) + paths <- setup_orderly() + cl <- orderly_remote_sharedrive(paths$remote) - folder <- list(download = mockery::mock(zip)) - cl <- orderly_remote_sharepoint_$new(folder) - res <- cl$metadata("example", id) + res <- cl$metadata("example", basename(paths$report_paths$example[1])) expect_true(file.exists(res)) ## metadata can be read rds <- readRDS(res) expect_true(!is.null(rds)) - - mockery::expect_called(folder$download, 1) - args <- mockery::mock_args(folder$download)[[1]] - expect_equal(args[[1]], file.path("archive/example", id)) - expect_match(args[[2]], "\\.zip$") - expect_equal(normalizePath(dirname(args[[2]]), mustWork = TRUE), - normalizePath(tempdir(), mustWork = TRUE)) }) -test_that("push", { - path <- orderly1::orderly_example("minimal") - id <- orderly1::orderly_run("example", root = path, echo = FALSE) - p <- orderly1::orderly_commit(id, root = path) - - folder <- list(create = mockery::mock(), upload = mockery::mock()) - - cl <- orderly_remote_sharepoint_$new(folder) - - mock_zip <- mockery::mock(NULL) - mockery::stub(cl$push, "zip_dir", mock_zip) - res <- cl$push(p) - - mockery::expect_called(mock_zip, 1) - args <- mockery::mock_args(mock_zip)[[1]] - expect_equal(args[[1]], p) - expect_match(args[[2]], "\\.zip$") - zip <- args[[2]] - - mockery::expect_called(folder$create, 1) - expect_equal( - mockery::mock_args(folder$create)[[1]], - list("archive/example")) - mockery::expect_called(folder$upload, 1) - expect_equal( - mockery::mock_args(folder$upload)[[1]], - list(zip, file.path("archive/example", id))) +test_that("useful error returned when trying to fetch metadata for unknown", { + cl <- orderly_remote_sharedrive(tempfile()) + expect_error(cl$metadata("thing", "123"), + "file doesn't exist.") }) test_that("report_run is not supported", { - cl <- orderly_remote_sharepoint_$new(NULL) + cl <- orderly_remote_sharedrive(NULL) expect_error(cl$run(), - "'orderly_remote_sharepoint' remotes do not run") + "'orderly_remote_sharedrive' remotes do not run") }) test_that("report_run is not supported", { - cl <- orderly_remote_sharepoint_$new(NULL) + cl <- orderly_remote_sharedrive(NULL) expect_error(cl$kill("my_key"), - "'orderly_remote_sharepoint' remotes do not support kill") + "'orderly_remote_sharedrive' remotes do not support kill") }) test_that("url_report is not supported", { - cl <- orderly_remote_sharepoint_$new(NULL) + cl <- orderly_remote_sharedrive(NULL) expect_error(cl$url_report("a", "b"), - "'orderly_remote_sharepoint' remotes do not support urls") + "'orderly_remote_sharedrive' remotes do not support urls") }) test_that("bundles are not supported", { - cl <- orderly_remote_sharepoint_$new(NULL) + cl <- orderly_remote_sharedrive(NULL) expect_error(cl$bundle_pack(), - "'orderly_remote_sharepoint' remotes do not support bundles") + "'orderly_remote_sharedrive' remotes do not support bundles") expect_error(cl$bundle_import(), - "'orderly_remote_sharepoint' remotes do not support bundles") -}) - - -test_that("verify path on creation", { - client <- list( - folder = mockery::mock(stop("some error"))) - expect_error( - orderly_sharepoint_folder(client, "site", "path"), - "Error reading from site:path - some error") - - mockery::expect_called(client$folder, 1) - expect_equal(mockery::mock_args(client$folder)[[1]], - list("site", "path", verify = TRUE)) -}) - - -test_that("skip if already created", { - folder <- list(download = mockery::mock("orderly.sharepoint")) - client <- list(folder = mockery::mock(folder)) - - res <- orderly_sharepoint_folder(client, "site", "path") - expect_identical(res, folder) - - mockery::expect_called(client$folder, 1) - expect_equal(mockery::mock_args(client$folder)[[1]], - list("site", "path", verify = TRUE)) - - mockery::expect_called(folder$download, 1) - expect_equal(mockery::mock_args(folder$download)[[1]], - list("orderly.sharepoint")) -}) - - -test_that("continue if not created", { - folder <- list(download = mockery::mock(stop("not found")), - list = mockery::mock(data.frame(name = character(0))), - create = mockery::mock(NULL), - upload = mockery::mock(NULL)) - client <- list(folder = mockery::mock(folder)) - - res <- orderly_sharepoint_folder(client, "site", "path") - expect_identical(res, folder) - - mockery::expect_called(client$folder, 1) - expect_equal(mockery::mock_args(client$folder)[[1]], - list("site", "path", verify = TRUE)) - - mockery::expect_called(folder$download, 1) - expect_equal(mockery::mock_args(folder$download)[[1]], - list("orderly.sharepoint")) - - mockery::expect_called(folder$list, 1) - expect_equal(mockery::mock_args(folder$list)[[1]], list()) - - mockery::expect_called(folder$upload, 1) - args <- mockery::mock_args(folder$upload)[[1]] - expect_equal(args[[2]], "orderly.sharepoint") - - mockery::expect_called(folder$create, 1) - expect_equal(mockery::mock_args(folder$create)[[1]], - list("archive")) -}) - - -test_that("error if files exist", { - folder <- list(download = mockery::mock(stop("not found")), - list = mockery::mock(data.frame(name = "a")), - upload = mockery::mock(NULL)) - client <- list(folder = mockery::mock(folder)) - - expect_error( - orderly_sharepoint_folder(client, "site", "path"), - paste("Directory site:orderly.sharepoint cannot be used for orderly;", - "contains other files")) - - mockery::expect_called(client$folder, 1) - expect_equal(mockery::mock_args(client$folder)[[1]], - list("site", "path", verify = TRUE)) - - mockery::expect_called(folder$download, 1) - expect_equal(mockery::mock_args(folder$download)[[1]], - list("orderly.sharepoint")) - - mockery::expect_called(folder$list, 1) - expect_equal(mockery::mock_args(folder$list)[[1]], list()) - - mockery::expect_called(folder$upload, 0) -}) - - -test_that("creation", { - folder <- new.env() - mock_folder <- mockery::mock(folder) - client <- new.env() - mock_client <- mockery::mock(client) - - mockery::stub(orderly_remote_sharepoint, "orderly_sharepoint_client", - mock_client) - mockery::stub(orderly_remote_sharepoint, "orderly_sharepoint_folder", - mock_folder) - res <- orderly_remote_sharepoint("https://example.com", "site", "path", - name = "name") - expect_identical(res$folder, folder) - expect_identical(res$name, "name") - - mockery::expect_called(mock_client, 1) - expect_equal(mockery::mock_args(mock_client)[[1]], - list("https://example.com")) - - mockery::expect_called(mock_folder, 1) - expect_identical(mockery::mock_args(mock_folder)[[1]], - list(client, "site", "path")) + "'orderly_remote_sharedrive' remotes do not support bundles") }) From 2dbeaf36bb021d759ee343b07a11a2bcd0fd0e8c Mon Sep 17 00:00:00 2001 From: Rob Ashton Date: Fri, 1 Dec 2023 10:29:20 +0000 Subject: [PATCH 2/2] Remove unnecessary setequal --- tests/testthat/test-orderly.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-orderly.R b/tests/testthat/test-orderly.R index 395e935..b73abba 100644 --- a/tests/testthat/test-orderly.R +++ b/tests/testthat/test-orderly.R @@ -63,8 +63,8 @@ test_that("pull", { expect_true(file.exists(res)) expect_true(file.info(res)$isdir) expect_setequal(dir(res), dir(paths$report_paths$example[1])) - expect_setequal(openssl::md5(dir(res)), - openssl::md5(dir(paths$report_paths$example[1]))) + expect_equal(openssl::md5(dir(res)), + openssl::md5(dir(paths$report_paths$example[1]))) })