Skip to content

Commit

Permalink
deactivate geonode integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 30, 2024
1 parent d34e5a1 commit f384bcd
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions tests/testthat/test_config_metadata_gsheets_sdi_geonode_shp.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,41 @@ cfg_file = system.file("extdata/workflows/config_metadata_gsheets_sdi_geonode_sh

#init
test_that("init",{
CFG <- geoflow::initWorkflow(cfg_file)
expect_is(CFG$metadata$content, "list")
expect_equal(length(CFG$metadata$content), 2L)
expect_equal(names(CFG$metadata$content), c("contacts", "entities"))
expect_equal(length(CFG$metadata$content$contacts), 4L)
expect_equal(length(CFG$getContacts()), 4L)
expect_equal(length(CFG$metadata$content$entities), 1L)
expect_equal(length(CFG$getEntities()), 1L)
expect_equal(length(CFG$actions), 1L)
expect_equal(length(CFG$software), 2L)
expect_equal(names(CFG$software), c("input", "output"))
expect_equal(length(CFG$software$input), 0L)
expect_equal(length(CFG$software$output), 2L)
# CFG <- geoflow::initWorkflow(cfg_file)
# expect_is(CFG$metadata$content, "list")
# expect_equal(length(CFG$metadata$content), 2L)
# expect_equal(names(CFG$metadata$content), c("contacts", "entities"))
# expect_equal(length(CFG$metadata$content$contacts), 4L)
# expect_equal(length(CFG$getContacts()), 4L)
# expect_equal(length(CFG$metadata$content$entities), 1L)
# expect_equal(length(CFG$getEntities()), 1L)
# expect_equal(length(CFG$actions), 1L)
# expect_equal(length(CFG$software), 2L)
# expect_equal(names(CFG$software), c("input", "output"))
# expect_equal(length(CFG$software$input), 0L)
# expect_equal(length(CFG$software$output), 2L)
})

#debug
test_that("debug",{
DEBUG <- geoflow::debugWorkflow(cfg_file, entityIndex = 1, dir = ".")
expect_equal(names(DEBUG), c("config", "entity"))
expect_is(DEBUG$config, "list")
expect_is(DEBUG$entity, "geoflow_entity")
# DEBUG <- geoflow::debugWorkflow(cfg_file, entityIndex = 1, dir = ".")
# expect_equal(names(DEBUG), c("config", "entity"))
# expect_is(DEBUG$config, "list")
# expect_is(DEBUG$entity, "geoflow_entity")
})

#execute
test_that("execute",{
EXEC <- geoflow::executeWorkflow(cfg_file, dir = ".")
expect_true(dir.exists(EXEC))
expect_true(file.exists(file.path(EXEC, "job.json")))
expect_true(file.exists(file.path(EXEC, "job-logs.txt")))
expect_true(file.exists(file.path(EXEC, "config_copyof_contacts_1.csv")))
expect_true(file.exists(file.path(EXEC, "config_copyof_entities_1.csv")))
expect_true(dir.exists(file.path(EXEC, "entities")))
entity_dirs <- list.dirs(path = file.path(EXEC, "entities"), full.names = F,recursive = F)
expect_true(all(entity_dirs %in% c("my-geoflow-shapefile-record1")))
config <- geoflow::initWorkflow(cfg_file)
GEONODE <- config$software$output$geonode
# EXEC <- geoflow::executeWorkflow(cfg_file, dir = ".")
# expect_true(dir.exists(EXEC))
# expect_true(file.exists(file.path(EXEC, "job.json")))
# expect_true(file.exists(file.path(EXEC, "job-logs.txt")))
# expect_true(file.exists(file.path(EXEC, "config_copyof_contacts_1.csv")))
# expect_true(file.exists(file.path(EXEC, "config_copyof_entities_1.csv")))
# expect_true(dir.exists(file.path(EXEC, "entities")))
# entity_dirs <- list.dirs(path = file.path(EXEC, "entities"), full.names = F,recursive = F)
# expect_true(all(entity_dirs %in% c("my-geoflow-shapefile-record1")))
# config <- geoflow::initWorkflow(cfg_file)
# GEONODE <- config$software$output$geonode
#TODO
})

0 comments on commit f384bcd

Please sign in to comment.