Closed ariel-miculas closed 1 year ago
But, manually doing a build followed by mount on a busybox container rfs did work.
@hallyn you need to run docker pull ubuntu:latest
for that test to pass, see https://github.com/anuvu/puzzlefs/blob/master/.github/workflows/ci.yaml#L22
@hallyn you need to run
docker pull ubuntu:latest
for that test to pass, see https://github.com/anuvu/puzzlefs/blob/master/.github/workflows/ci.yaml#L22
What's this 'docker' thing? (I don't have docker installed)
The testcase should probably be gated on whether docker is installed.
And we could add a testcase which does something along the lines of
which lxc-create || exit 0
lxcname=$(basename $(mktemp -u))
lxc-create -t download -n $lxcname -- -d alpine -r edge -a amd64
dir=$(mkdir -d)
mkdir -p $dir/oci $dir/mnt
export dir
export lxcname
lxc-usernsexec -s -- << "EOF"
unshare -m -- << "XXX"
set -e
puzzlefs create $HOME/.local/share/lxc/$lxcname/rootfs $dir/oci rfs
puzzlefs mount $dir/oci rfs $dir/mnt
test -e $dir/mnt/etc
diff -Nrup $HOME/.local/share/lxc/$lxcname/rootfs $dir/mnt
XXX
EOF
If we gate the testcase, then one may think all tests have passed, when in fact one test couldn't run. It would be nice if the test could be skipped based on runtime information, but rust doesn't have support for this. Maybe we should move more complex tests out of the unit test framework and run them separately?
I would turn this around: "make test" is what I would expect to run at the command line. That's the one I'd expect to just run things which can possibly run locally. (The docker test should be listed as "ignored", not "passed", so the user can still see it).
The tests which are run from .github/workflows/ci.yaml could be run with 'make autotest' or something, which fails in those cases.
We can get rid of docker: https://github.com/anuvu/puzzlefs/issues/68
Hm, when I ran 'make test' locally I got: