Skip to content

Commit 035e4d8

Browse files
authored
Merge pull request #24 from kushthedude/ciFix
fix: run nighthawk through binary
2 parents a773c8a + 729dfa0 commit 035e4d8

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v1
19+
uses: golangci/golangci-lint-action@v2
2020
with:
2121
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
22-
version: v1.29
22+
version: v1.32
2323

2424
# Optional: working directory, useful for monorepos
2525
# working-directory: somedir
@@ -54,9 +54,6 @@ jobs:
5454
export BUILDIFIER_BIN=$GOPATH/bin/buildifier
5555
go get -u github.com/bazelbuild/buildtools/buildozer
5656
export BUILDOZER_BIN=$GOPATH/bin/buildozer
57-
git clone https://github.com/envoyproxy/envoy
58-
cd envoy
59-
bazel build //source/exe:envoy-static -c opt
6057
test-assets:
6158
strategy:
6259
matrix:
@@ -75,6 +72,8 @@ jobs:
7572
- name: start build
7673
run: |
7774
chmod +x ./apinighthawk/bin/nighthawk_client
78-
cd apinighthawk/bin
75+
cd apinighthawk
76+
export PATH=$PATH:$(pwd)/bin
77+
cd bin
7978
chmod +x nighthawk_client
80-
./nighthawk_client --rps 3 --concurrency 5 --duration 30 https://github.com
79+
nighthawk_client --rps 3 --concurrency 5 --duration 30 https://github.com --output-format experimental_fortio_pedantic

apinighthawk/nighthawk.go

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,9 @@ type NighthawkConfig struct {
2121

2222
// NighthawkRun function runs the nighthawk loadtest
2323
func NighthawkRun(config *NighthawkConfig) ([]byte, error) {
24-
imageName := "envoyproxy/nighthawk-dev"
25-
_, err := exec.Command("docker", "inspect", imageName).Output()
26-
if err != nil {
27-
msg := "Setup nighthawk image before executing load-test"
28-
err = errors.Wrapf(err, msg)
29-
log.Error(err)
30-
return nil, err
31-
}
32-
3324
rURL, _ := url.Parse(config.URL)
3425
if !rURL.IsAbs() {
35-
err = fmt.Errorf("please give a valid URL %s", config.URL)
26+
err := fmt.Errorf("please give a valid URL %s", config.URL)
3627
log.Error(err)
3728
return nil, err
3829
}
@@ -49,9 +40,7 @@ func NighthawkRun(config *NighthawkConfig) ([]byte, error) {
4940

5041
log.Info("Received arguments for run", args)
5142

52-
out, err := exec.Command("docker", "run",
53-
"envoyproxy/nighthawk-dev:latest",
54-
"nighthawk_client",
43+
out, err := exec.Command("nighthawk_client",
5544
"--rps "+qps,
5645
"--concurrency 1",
5746
"--connections "+c,

0 commit comments

Comments
 (0)