test: deflake stats test
it is much less likely two containers will use the same amount of memory if they're different containers
@@ -33,15 +33,12 @@ function teardown() {
@test "container stats" {
# given
- python -c 'import json,sys;obj=json.load(sys.stdin);obj["name"] = ["podsandbox1-sleep2"];obj["metadata"]["name"] = "podsandbox1-sleep2"; json.dump(obj, sys.stdout)' \
- < "$TESTDATA"/container_sleep.json > "$TESTDIR"/container_sleep2.json
-
pod_id=$(crictl runp "$TESTDATA"/sandbox_config.json)
ctr1_id=$(crictl create "$pod_id" "$TESTDATA"/container_sleep.json "$TESTDATA"/sandbox_config.json)
crictl start "$ctr1_id"
- ctr2_id=$(crictl create "$pod_id" "$TESTDIR"/container_sleep2.json "$TESTDATA"/sandbox_config.json)
+ ctr2_id=$(crictl create "$pod_id" "$TESTDATA"/container_redis.json "$TESTDATA"/sandbox_config.json)
crictl start "$ctr2_id"
# when
