Skip to content

Commit

Permalink
change fail, add fail fast
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed Aug 22, 2024
1 parent 8555125 commit 207d3c4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
branches:
- main
on: push

jobs:
golangci:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_ACCESS_TOKEN }}
- name: Run tests
run: |
make test
FAIL_FAST=true make test
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ macos-pkg-notarize:
### make cleanall && make build-prerelease && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all
### make cleanall && make build-official && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all

# set var fail fast to value of env var or to true by default
FAIL_FAST ?= false

.PHONY: test
test: integration unit

Expand All @@ -508,7 +511,13 @@ test-large: integration-large unit
.PHONY: integration
integration:
mkdir -p $(COV_INTEGRATION_DIR) || true
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m
if [ "$(FAIL_FAST)" = "true" ]; then \
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -failfast -tags=integration -timeout 30m ; \
else \
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m ; \
fi

# COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m

.PHONY: integration-large
integration-large:
Expand Down
4 changes: 2 additions & 2 deletions e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ func (suite *CmdTestSuite) TestPipeFromListIndexToCreateIndex() {
logger.Debug(string(output))

if tc.createFail && err == nil {
suite.FailNowf("expected create cmd to fail because at least one index failed to be created", "%v", err)
suite.Failf("expected create cmd to fail because at least one index failed to be created", "%v", err)
} else if !tc.createFail && err != nil {
suite.FailNowf("expected create cmd to succeed because all indexes were created", "%v : %s", err.Error(), output)
suite.Failf("expected create cmd to succeed because all indexes were created", "%v : %s", err.Error(), output)
}

// Cleanup list and sed commands
Expand Down

0 comments on commit 207d3c4

Please sign in to comment.