goss icon indicating copy to clipboard operation
goss copied to clipboard

Default tests assume root occupancy <25%

Open sshipway opened this issue 6 years ago • 3 comments

Describe the feature: The default tests include a check on the root filesystem, verifying it is mounted with usage under 25%. This is not always the case in real life.

Describe the solution you'd like Change the test to be <95% so that tests can be expected to pass on most systems.

Describe alternatives you've considered I've changed it temporarily for now so I can work but it is a small change that would make contributing easier

sshipway avatar Jan 08 '20 05:01 sshipway

Are the tests in docker experiencing this or running them on the host machine?

Either way, this doesn't hurt as a change so I'm approving this. I'll accept a PR changing this.

aelsabbahy avatar Jan 09 '20 15:01 aelsabbahy

The tests in docker are getting this problem - they have the same root filesystem as the host and so report the same free space. Also, I'm using docker 18.09, and the seccomp_opts function in test.sh only tests for the minor version for some reason - in this version of docker I need to add "--privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro" else the httpd service fails to start.

steves@eric:~/git/sshipway-goss/integration-tests$ df /
Filesystem                  1K-blocks      Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root 228605204 159023072  57946628  74% /
steves@eric:~/git/sshipway-goss/integration-tests$ docker run --env OS=centos7  --cap-add SYS_ADMIN -v "/home/steves/git/sshipway-goss/integration-tests/goss:/goss" -d --name "gosstest" --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --security-opt seccomp:unconfined "aelsabbahy/goss_centos7" /sbin/init
332b238021e2205935814991f2d7d339e8d0f57361c031dacedb09376c8851c3
steves@eric:~/git/sshipway-goss/integration-tests$ docker exec -i -t gosstest df
Filesystem                  1K-blocks      Used Available Use% Mounted on
none                        228605204 159023340  57946360  74% /

sshipway avatar Jan 09 '20 19:01 sshipway

I have the fix for this included in #697 (since I cant test anything else until I have this)

sshipway avatar Apr 27 '21 08:04 sshipway

Closed by #697

aelsabbahy avatar Oct 08 '22 16:10 aelsabbahy