Commit graph

8 commits

Author SHA1 Message Date
Debarshi Ray
021053716e test/system: Add copyright and license notices
https://github.com/containers/toolbox/pull/1179
2022-11-29 13:54:13 +01:00
Debarshi Ray
685f1f794d test/system: Be more strict when checking the version
https://github.com/containers/toolbox/pull/1165
2022-11-17 11:28:00 +01:00
Ondřej Míchal
fb565af0a0 test/system: Add function for setting up environment
Instead of typing out two function names to set up the test environment,
type out only one. We never know if a new set up function will show up.

https://github.com/containers/toolbox/pull/818
2021-12-01 01:09:34 +02:00
Ondřej Míchal
871d905ceb test/system: Use env var for invoking Toolbox
The system test refactor[0] replaced the 'run_toolbox' helper function
with 'run toolbox', which is a normal invocation of Toolbox. This makes
it impossible to override Toolbox used during the tests using env var.

[0] https://github.com/containers/toolbox/pull/693
2021-05-26 22:52:40 +02:00
Seppo Yli-Olli
baac0461bd test/system: Support an optional nano version number
https://github.com/containers/toolbox/pull/709
2021-02-24 22:14:38 +01:00
Juanje Ojeda
b27795a03e test/system: Refactor tests using bats-support and bats-assert
The bats-support[0] and bats-assert[1] libraries extend the
capabilities of bats[2]. Mainly, bats-assert is very useful for clean
checking of values/outputs/return codes.

Apart from updating the cases to use the libraries, the test cases have
been restructured in a way that they don't depend on each other anymore.
This required major changes in the helpers.bats file.

Overall, the tests are cleaner to read and easier to extend due to the
test cases being independent.

Some slight changes were made to the test cases themselves. Should not
alter their final behaviour.

There will be a follow up commit that will take care of downloading of
the tested images locally and caching them using Skopeo to speedup the
tests and try to resolve network problems when pulling the images that
we experienced in the past.

[0] https://github.com/bats-core/bats-support
[1] https://github.com/bats-core/bats-assert
[2] https://github.com/bats-core/bats-core
2021-02-12 14:02:08 +01:00
Harry Míchal
5a651eae2f playbooks, test/system: Test the Go implementation and update tests
In the Go implementation, when the 'rm' and 'rmi' commands fail to
remove a container or image, they don't use a non-zero exit code.
There's currently no nice fix for this. So, the tests have been
adjusted as a temporary measure.

https://github.com/containers/toolbox/pull/507
2020-07-21 16:31:50 +02:00
Harry Míchal
1e2232762c test/system: Rework the tests
The tests introduced by commit b5cdc57ae3 have proven to be
rather unstable due to mistakes in their design. The tests were quite
chaotically structured, and because of that images were deleted and
pulled too often, causing several false positives [1, 2].

This changes the structure of the tests in a major way. The tests
(resp. commands) are now run in a manner that better simulates the way
Toolbox is actually used. From a clean state, through creating
containers, using them and in the end deleting them. This should
reduce the strain on the bandwidth and possibly even speed up the
tests themselves.

[1] https://github.com/containers/toolbox/pull/372
[2] https://github.com/containers/toolbox/pull/374

https://github.com/containers/toolbox/pull/375
2020-02-18 14:00:59 +01:00
Renamed from test/system/001-basics.bats (Browse further)