Skip to content

Commit

Permalink
test: add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed May 12, 2024
1 parent 5c44688 commit bc85375
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/r-dependent-packages/r-ver-postcreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e

# Optional: Import test library bundled with the devcontainer CLI
source dev-container-features-test-lib

# Feature-specific tests
check "R cli package" bash -c "R -q -e 'names(installed.packages()[, 3])' | grep cli"
check "R rlang package" bash -c "R -q -e 'names(installed.packages()[, 3])' | grep rlang"

# Report result
reportResults
5 changes: 5 additions & 0 deletions test/r-dependent-packages/r-ver-postcreate/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: foo
Version: 0.0.0.9000
Suggests:
cli,
rlang
13 changes: 13 additions & 0 deletions test/r-dependent-packages/r-ver-updatecontent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e

# Optional: Import test library bundled with the devcontainer CLI
source dev-container-features-test-lib

# Feature-specific tests
check "R cli package" bash -c "R -q -e 'names(installed.packages()[, 3])' | grep cli"
check "R rlang package" bash -c "R -q -e 'names(installed.packages()[, 3])' | grep rlang"

# Report result
reportResults
5 changes: 5 additions & 0 deletions test/r-dependent-packages/r-ver-updatecontent/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: foo
Version: 0.0.0.9000
Suggests:
cli,
rlang
18 changes: 18 additions & 0 deletions test/r-dependent-packages/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,23 @@
"manifestRoot": ".devcontainer"
}
}
},
"r-ver-postcreate": {
"image": "rocker/r-ver:4",
"features": {
"r-dependent-packages": {
"manifestRoot": ".devcontainer",
"when": "postCreate"
}
}
},
"r-ver-updatecontent": {
"image": "rocker/r-ver:4",
"features": {
"r-dependent-packages": {
"manifestRoot": ".devcontainer",
"when": "updateContent"
}
}
}
}

0 comments on commit bc85375

Please sign in to comment.