Skip to content

Commit

Permalink
Improve tests and ensure bioconductor data is rejected
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronJackson committed Oct 16, 2024
1 parent cc77545 commit bf38f8d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions reverse_proxy/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,58 @@
fail_msg: "Request to valid file extension was blocked."
success_msg: "Request to valid file extension was not blocked."

- name: test connection data/annotation/src/contrib/chicken.db_3.13.0.tar.gz
uri:
url: http://bioconductor.{{zone}}/packages/3.20/data/annotation/src/contrib/chicken.db_3.13.0.tar.gz
force: true # avoid hitting cache
failed_when: false
changed_when: false
register: bioconductor_data1

- name: test connection data/annotation/src/contrib/chicken.db_3.13.0.tar.gz
assert:
that: bioconductor_data1.status == 403
fail_msg: "bioconductor requests to annotation data should fail"
success_msg: "bioconductor requests to annotation data failed correctly"

- name: test connection data/experiment/src/contrib/colonCA_1.46.0.tar.gz
uri:
url: http://bioconductor.{{zone}}/packages/release/data/experiment/src/contrib/colonCA_1.46.0.tar.gz
force: true # avoid hitting cache
failed_when: false
changed_when: false
register: bioconductor_data2

- name: test connection data/experiment/src/contrib/colonCA_1.46.0.tar.gz
assert:
that: bioconductor_data2.status == 403
fail_msg: "bioconductor requests to experiment data should fail"
success_msg: "bioconductor requests to experiment data failed correctly"

- name: bioconductor package installation
shell:
cmd: |
rm -rf /usr/local/lib/R/site-library/BiocVersion # remove if installed
/usr/bin/R --no-save <<RPROG
install.packages("BiocManager")
options(BIOCONDUCTOR_CONFIG_FILE="file:///root/config.yaml")
options(BioC_mirror="http://bioconductor.localhost")
options(BIOCMANAGER_SITE_REPOSITORY="http://bioconductor.localhost")
library(BiocManager)
BiocManager::install("BiocVersion")
q()
RPROG
ls /usr/local/lib/R/site-library/BiocVersion
failed_when: false
changed_when: false
register: bioc_install

- name: ensure bioconductor package installed successfully
assert:
that: bioc_install.rc == 0
fail_msg: "Failed to install R package (dplyr) from local proxy"
success_msg: "R package (dplyr) was successfully installed via local proxy"

######################################################################
# conda-forge tests

Expand Down

0 comments on commit bf38f8d

Please sign in to comment.