opensafely-core / research-template-docker

This provides the devcontainer Docker image used by repos created from the OpenSAFELY research template.
Other
0 stars 0 forks source link

Add test for postCreate.sh #65

Closed Jongmassey closed 1 month ago

Jongmassey commented 1 month ago

In the process of #64 I found there weren't any tests for postCreate.sh which make it hard to be assured the changes I was making were working.

This branch adds such tests, and I have found that the pre-existing postCreate.sh was failing them ( just test-postcreate-script should fail at 078208a63e6fa7bd2a3ba617025e469583eac24c or earlier).

I therefore have included a fix for that failure in 5bae9217daf87a477ae296f598e5ab65b0b4cade.

I'm not sure what's different about the codespaces/devcontainer setup that meant that these settings would have ever been set correctly with the previous code, but the tests added here seem to trigger (and fail on) the "blank RStudio preferences file" scenario described in this issue. I'm not 100% confident that the changes in this PR that make that test pass will fix that issue, but believe having some tests is better than no tests at all.