-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2374e56
commit 3ac3d2b
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
integration: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.x" | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Start containers | ||
run: docker compose up --build --detach | ||
- name: run integration test | ||
run: go test --tags=integration | ||
- name: Stop containers | ||
if: always() | ||
run: docker compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//go:build integration | ||
|
||
package main | ||
|
||
// TestIntegration checks that unbound_exporter is running, successfully | ||
// scraping and exporting metrics. | ||
// | ||
// It assumes unbound_exporter is available on localhost:9167, and Unbound on | ||
// localhost:1053, as is set up in the docker-compose.yml file. | ||
// | ||
// A typical invocation of this test would look like | ||
// docker compose up --build -d | ||
// go test --tags=integration | ||
// docker compose down | ||
func TestIntegration(t *testing.T) { | ||
// TODO | ||
} |