Skip to content

Commit

Permalink
Fix Envoy Version Test - Label Agnostic (#12831)
Browse files Browse the repository at this point in the history
To support internal builds of Envoy that may assign a label other than
`dev`, there is no good reason that this test should hardcode that value
in and can still be correct.

Signed-off-by: John Murray <[email protected]>
  • Loading branch information
murray-stripe authored Aug 26, 2020
1 parent d471426 commit 79058d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/exe/version_out_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e -o pipefail
ENVOY_BIN=${TEST_SRCDIR}/envoy/source/exe/envoy-static

COMMIT=$(${ENVOY_BIN} --version | \
sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-dev)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\1/p')
sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-[a-zA-Z0-9\-_]+)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\1/p')

EXPECTED=$(cat ${TEST_SRCDIR}/envoy/bazel/raw_build_id.ldscript)

Expand All @@ -15,7 +15,7 @@ if [[ ${COMMIT} != ${EXPECTED} ]]; then
fi

VERSION=$(${ENVOY_BIN} --version | \
sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-dev)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\2\3/p')
sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-[a-zA-Z0-9\-_]+)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\2\3/p')

EXPECTED=$(cat ${TEST_SRCDIR}/envoy/VERSION)

Expand Down

0 comments on commit 79058d6

Please sign in to comment.