-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing BasicAuth requirement for Connections (#210)
Fixes #206 ChangeLog: - Adding better testing patterns allowing easy ENV based switch from basic to token based auth. - Adding a matrix for token tests
- Loading branch information
1 parent
2b810ee
commit 4e7f747
Showing
16 changed files
with
94 additions
and
96 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 |
---|---|---|
|
@@ -11,23 +11,22 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
go: [ 1.21.0 ] | ||
grafana: [ 8.5.22, 9.4.3, 10.1.4 ] | ||
go: [ {version: 1.21.0, token: 1}, {version: 1.21.0, token: 0}] | ||
grafana: [ 10.1.4 ] | ||
|
||
env: | ||
GRAFANA_INTEGRATION: 1 | ||
TEST_TOKEN_CONFIG: "${{ matrix.go.token }}" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
go-version: ${{ matrix.go.version }} | ||
- name: Verify go version | ||
run: go version | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
|
@@ -36,14 +35,17 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Validate ENV Value | ||
shell: bash | ||
run: | | ||
echo "token IS $TEST_TOKEN_CONFIG" | ||
- name: Calc coverage | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}" | ||
if: "${{ matrix.go.version == '1.21.0' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
run: | | ||
go test -v -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Convert coverage.out to coverage.lcov | ||
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}" | ||
if: "${{ matrix.go.version == '1.21.0' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
uses: jandelgado/[email protected] | ||
- name: Test | ||
if: "${{ matrix.grafana != '10.1.4' }}" | ||
- name: Test | ||
if: "${{ matrix.go.token == '1' }}" | ||
run: go test -v ./... | ||
|
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ prod/ | |
public | ||
resources | ||
.idea | ||
config/token*.yml |
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.