dotnet-buildtools-prereqs-docker icon indicating copy to clipboard operation
dotnet-buildtools-prereqs-docker copied to clipboard

Add unit tests for Helix images

Open mthalman opened this issue 11 months ago • 1 comments

This would validate that Helix is correctly configured in these images. There are currently no tests for the images produced by this repo (the Test stage is skipped in the pipeline). But the infrastructure supports this so it's just a matter of defining the tests. And now we do have a place to put them too: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/tree/main/tests/Microsoft.DotNet.BuildTools.Prereqs.Docker.Tests

mthalman avatar Feb 19 '25 21:02 mthalman

main Helix requirement is for our Python dependencies to be pre-installed in the Docker containers we use. there's more information about our setup in #1330 but the TL;DR; is we install the helix-scripts to pick up those dependencies. there's a particular focus on dependencies not available as Python binary wheels b/c we don't want or need some of the tools (e.g., Rust) in the Helix Docker images

currently, the requirements.txt files in the helix-scripts wheel is somewhat incomplete. that should improve early next week but I don't think we need to validate the complete set

suggest a few superficial checks like

  1. is $VIRTUAL_ENV defined and pointing to a directory available in the container❓
  2. does $PATH contain $VIRTUAL_ENV/bin or $env:VIRTUAL_ENV\Scripts
  3. does python3 -m pip list | grep -q '^helix-scripts ' or python3 -m pip list | findstr /r /c:"^helix-scripts " succeed❓
  4. perhaps, ask similar questions about the setuptools and requests modules b/c we've had issues w/ both in the past

dougbu avatar Feb 28 '25 18:02 dougbu