unit tests should avoid calling the singularity binary
Version of Singularity:
c5011b8ec498a4abbe2ffd0650ac173f39284936
Expected behavior
Unit tests should only call internal functions and should avoid calling the singularity binary through exec.cmd. When a unit test calls Singularity through exec.cmd, it assumes that Singularity must be installed prior the execution of the test, which we would like to avoid. If a test truly require to invoke the singularity binary, it most certainly belongs to the e2e framework.
Actual behavior
There is already agreement that unit tests in cmd/singularity should move to the e2e framework but here are the current test relying on the singularity binary:
cmd/singularity/cli_test.go: path, err := exec.LookPath("singularity")
Other references: pkg/image/image_test.go: sexec, err := exec.LookPath("singularity") pkg/ocibundle/sif/bundle_linux_test.go: sing, err := exec.LookPath("singularity")
Steps to reproduce behavior
Write here.
#5939 has dropped the pkg/image/image_test.go instance.
Work on #5830 will drop the cmd/singularity/cli_test.go
Going to work on the pkg/ocibundle/sif/bundle_linux_test.go instance
Hello,
This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.
Please consider the following:
- Is this issue a duplicate, or has it been fixed/implemented since being added?
- Is the issue still relevant to the current state of Singularity's functionality?
- Would you like to continue discussing this issue or feature request?
Thanks, Carter
This issue has been automatically marked as stale because it has not had activity in over 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
@gvallee @dtrudg Still getting this problem ? Have this been solved already ? If yes, what work around have you followed and applied ?
We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.
Copied into the new Apptainer repo issue https://github.com/apptainer/apptainer/issues/1156