singularity icon indicating copy to clipboard operation
singularity copied to clipboard

unit tests should avoid calling the singularity binary

Open gvallee opened this issue 6 years ago • 4 comments

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.

gvallee avatar Jun 21 '19 18:06 gvallee

#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

dtrudg avatar Apr 16 '21 14:04 dtrudg

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:

  1. Is this issue a duplicate, or has it been fixed/implemented since being added?
  2. Is the issue still relevant to the current state of Singularity's functionality?
  3. Would you like to continue discussing this issue or feature request?

Thanks, Carter

carterpeel avatar May 15 '21 16:05 carterpeel

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.

stale[bot] avatar Jul 14 '21 20:07 stale[bot]

@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.

pedroalvesbatista avatar Jul 16 '21 00:07 pedroalvesbatista

Copied into the new Apptainer repo issue https://github.com/apptainer/apptainer/issues/1156

kmuriki avatar Mar 06 '23 00:03 kmuriki