Make dev-container-features-test-lib script POSIX compliant (fixes #438)#959
Make dev-container-features-test-lib script POSIX compliant (fixes #438)#959garymacindoe wants to merge 1 commit intodevcontainers:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
Thank you! Have you by chance run against a repo that has a lot of test scripts, like https://github.com/devcontainers/features? |
|
I have run tests against devcontainers/features using the version of the devcontainers CLI built from this PR. There are a few failures but they all seem to be because upstream repos have been removed or other failures unrelated to the changes in this PR. https://github.com/garymacindoe/features/actions/runs/13408523890 |
4b666f5 to
87ba5f7
Compare
|
I have forked the devcontainers/features repository and fixed most of the tests as they fail on the default branch with the current version of the devcontainers-cli. The latest test run is https://github.com/garymacindoe/features/actions/runs/13595482653. The main things that were failing were installing node LTS then checking that node 20 is installed when node 22 is the current LTS. As the LTS version of node is hardcoded in the test script it will start to fail again when a new version of node enters LTS. There were a couple of missing dependencies to successfully build git from source. The Python scenarios still fail for me in GitHub Actions because I don't have access to a big enough runner but pass for me locally. The dotnet LTS install also fails because the install script correctly installs version 8 which is the current LTS but the test script queries https://builds.dotnet.microsoft.com/dotnet/Sdk/LTS/latest.version which currently returns |
I've rewritten the
dev-container-features-test-libscript included in thedevcontainerCLI to be POSIX-compliant (using shellcheck).This fixes tests against images where the default shell is not Bash (such as in #438).