library(dplyr)
skip_if_no_auth <- function() {
if (identical(Sys.getenv("client_id"), "") || identical(Sys.getenv("client_secret"), "") || identical(Sys.getenv("tenant"), "")) {
skip("No authentication available")
}
}
context("ADL Directory List - More Than One Item In Directory")
test_that("file extension is correct",{
# set token if authentication is possible
if(identical(Sys.getenv("client_id"), "")){NULL
}else{
# set token
set_adl_token(tenant = Sys.getenv("tenant"), client_id = Sys.getenv("client_id"), client_secret = Sys.getenv("client_secret"))
}
# if not authentication is available then skip tests
skip_if_no_auth()
dirs <- adl_dir_ls(Sys.getenv("adl_file_dir_correct"))
expect_false(length(dirs) <= 1)
})
context("ADL Directory List - Read One Of The Paths")
test_that("file extension is correct",{
# set token if authentication is possible
if(identical(Sys.getenv("client_id"), "")){NULL
}else{
# set token
set_adl_token(tenant = Sys.getenv("tenant"), client_id = Sys.getenv("client_id"), client_secret = Sys.getenv("client_secret"))
}
# if not authentication is available then skip tests
skip_if_no_auth()
dirs <- adl_dir_ls(Sys.getenv("adl_file_dir_correct"))
df <- read_adl_delim(dirs[1], delim = ",")
expect_vector(df)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.