Skip to content

Commit

Permalink
test whether the flowr installation worked correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellpeck committed Oct 2, 2024
1 parent 0447f05 commit aad2c64
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/testthat/test-node.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@ test_that("install node", {
expect_no_error(install_node("22.5.1"))
})
test_that("install flowr", {
expect_equal(install_flowr("2.0.11"), 0)
flowr_version <- "2.0.11"
expect_equal(install_flowr(flowr_version), 0)

# test if the installation was actually successful
pid <- exec_flowr("--server", background = TRUE)
on.exit(tools::pskill(pid), add = TRUE, after = FALSE)
conn_hello <- connect()
on.exit(flowr::disconnect(conn_hello[[1]]), add = TRUE, after = FALSE)
response <- jsonlite::fromJSON(conn_hello[[2]])
expect_equal(response$versions$flowr, flowr_version)
})

0 comments on commit aad2c64

Please sign in to comment.