Skip to content

Commit 047a335

Browse files
chrishenziek8s-infra-cherrypick-robot
authored andcommitted
Forward RUNC_FLAVOR env var down to integration tests
Update Vagrantfile and cri-integration test runner to forward RUNC_FLAVOR to the test environment. Allows integration tests to conditionally skip testing certain cgroup mount setups when running against other runtimes that may not support them yet. Signed-off-by: Chris Henzie <[email protected]>
1 parent 9b2d72e commit 047a335

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Vagrantfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ EOF
278278
'GOTESTSUM_JSONFILE': ENV['GOTESTSUM_JSONFILE'],
279279
'GITHUB_WORKSPACE': '',
280280
'CGROUP_DRIVER': ENV['CGROUP_DRIVER'],
281+
'RUNC_FLAVOR': ENV['RUNC_FLAVOR'] || "runc",
281282
}
282283
sh.inline = <<~SHELL
283284
#!/usr/bin/env bash
@@ -306,6 +307,7 @@ EOF
306307
'GOTEST': ENV['GOTEST'] || "go test",
307308
'REPORT_DIR': ENV['REPORT_DIR'],
308309
'CGROUP_DRIVER': ENV['CGROUP_DRIVER'],
310+
'RUNC_FLAVOR': ENV['RUNC_FLAVOR'] || "runc",
309311
}
310312
sh.inline = <<~SHELL
311313
#!/usr/bin/env bash

script/test/cri-integration.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ CMD=""
4545
if [ -n "${sudo}" ]; then
4646
CMD+="${sudo} "
4747
fi
48+
CMD+="env "
49+
if [ -n "${RUNC_FLAVOR:-}" ]; then
50+
CMD+="RUNC_FLAVOR=${RUNC_FLAVOR} "
51+
fi
4852
CMD+="${PWD}/bin/cri-integration.test"
4953

5054
${CMD} --test.run="${FOCUS}" --test.v \

0 commit comments

Comments
 (0)