From 3b165f371d3cf53b12dae8891215b1d87e74508a Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: Wed, 19 Jan 2022 12:24:55 -0500 Subject: [PATCH] tests/kola/version/toolbox: check we have the correct toolbox version We want to keep shipping the version of `toolbox` from https://github.com/coreos/toolbox in RHCOS for the time being. But it is easy for the RHEL dist-git of `toolbox` to get updated without us being notified, so let's put a simple check in place to make sure we are getting the bash script version and not the golang version. --- tests/kola/version/toolbox | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 tests/kola/version/toolbox diff --git a/tests/kola/version/toolbox b/tests/kola/version/toolbox new file mode 100755 index 00000000..2f068dce --- /dev/null +++ b/tests/kola/version/toolbox @@ -0,0 +1,18 @@ +#!/bin/bash + +# This is RHCOS only, we ship a different version of toolbox in FCOS + +# kola: { "exclusive": false } +set -xeuo pipefail + +fatal() { + echo "$@" >&2 + exit 1 +} + +# make it a var so we can change when/if we switch to containers/toolbox +url="https://github.com/coreos/toolbox" + +if [ "$(rpm -q --qf '%{URL}' toolbox)" != "${url}" ]; then + fatal "Error: toolbox is not a shell script as expected" +fi