Skip to content

Commit

Permalink
ci: Reduce test resource usage and test with file db (sourcenetwork#791)
Browse files Browse the repository at this point in the history
* Close database instance once finished with it

* Run CI tests on IM and file databases
  • Loading branch information
AndrewSisley committed Sep 14, 2022
1 parent 530b5e3 commit 867b775
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
run: ./build/defradb start &

- name: Run the tests, showing name of each test
run: make test:names
run: make test:ci
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ clean\:test:
test:
gotestsum --format pkgname -- ./... -race -shuffle=on

.PHONY: test\:ci
test\:ci:
DEFRA_BADGER_MEMORY=true DEFRA_BADGER_FILE=true $(MAKE) test:names

.PHONY: test\:go
test\:go:
go test ./... -race -shuffle=on
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ func ExecuteQueryTestCase(
assert.Fail(t, "Expected an error however none was raised.", test.Description)
}
}

dbi.db.Close(ctx)
}
}

Expand Down

0 comments on commit 867b775

Please sign in to comment.