Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dev-container-features-test-lib script POSIX compliant (fixes #438) #959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garymacindoe
Copy link

I've rewritten the dev-container-features-test-lib script included in the devcontainer CLI to be POSIX-compliant (using shellcheck).

This fixes tests against images where the default shell is not Bash (such as in #438).

@garymacindoe garymacindoe requested a review from a team as a code owner February 16, 2025 10:21
@garymacindoe
Copy link
Author

@microsoft-github-policy-service agree

@joshspicer
Copy link
Member

Thank you! Have you by chance run against a repo that has a lot of test scripts, like https://github.com/devcontainers/features?

@garymacindoe
Copy link
Author

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

@garymacindoe garymacindoe force-pushed the main branch 3 times, most recently from 4b666f5 to 87ba5f7 Compare February 28, 2025 22:52
@garymacindoe
Copy link
Author

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 9.0.200. I haven't been able to fix that as I'm not sure of the correct API to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants