mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int: use = in test for strings comparison
Strictly speaking, == is for [[ only, not for [ / test, and, unlike =, the right side is a pattern. To avoid confusion, use =. In cases where we compare with empty string, use -z instead. Keep using [[ in some cases since it does not require quoting the left and right side of comparison (I trust shellcheck on that one). This should have no effect (other than the code being a tad more strict). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -35,9 +35,9 @@ function teardown() {
|
||||
|
||||
ROOT=$ALT_ROOT runc list -q
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "${lines[0]}" == "test_box1" ]]
|
||||
[[ "${lines[1]}" == "test_box2" ]]
|
||||
[[ "${lines[2]}" == "test_box3" ]]
|
||||
[ "${lines[0]}" = "test_box1" ]
|
||||
[ "${lines[1]}" = "test_box2" ]
|
||||
[ "${lines[2]}" = "test_box3" ]
|
||||
|
||||
ROOT=$ALT_ROOT runc list --format table
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user