Skip to content

Commit b38d78a

Browse files
committed
ci(bazel): pass in location of telegraf
1 parent f38ed2c commit b38d78a

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/bazel-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151

5252
- name: Scraping Test
5353
if: runner.os == 'macOS'
54-
run: bazel test ${{ matrix.bazel_args }} --test_output=all //pull/tests/integration:scrape-test
54+
run: bazel test ${{ matrix.bazel_args }} --test_output=all --test_env=TELEGRAF="$(brew --prefix telegraf)/bin/telegraf" //pull/tests/integration:scrape-test

pull/tests/integration/scrape.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env bash
22

3-
telegraf=$(which telegraf)
4-
if [ ! -x "$telegraf" ] ; then
3+
: "${TELEGRAF:=$(which telegraf)}"
4+
5+
if [ ! -x "$TELEGRAF" ] ; then
56
echo "telegraf must be in path for this test to run"
67
exit 1
78
fi
@@ -16,4 +17,4 @@ trap 'kill $(jobs -p)' EXIT
1617
timeout_after 10
1718

1819
pull/tests/integration/sample-server &
19-
telegraf --config pull/tests/integration/scrape.conf --quiet | grep -m1 http_requests_total
20+
"$TELEGRAF" --config pull/tests/integration/scrape.conf --quiet | grep -m1 http_requests_total

0 commit comments

Comments
 (0)