Skip to content

Commit a24319a

Browse files
committed
Github action test failure fix attempt CrunchyData#2.
1 parent 481d222 commit a24319a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
env:
12+
QUERIES_CONFIG_DIR: "${{ github.workspace }}/hack/tools/queries"
13+
1114
jobs:
1215
go-test:
1316
runs-on: ubuntu-20.04
@@ -34,7 +37,7 @@ jobs:
3437
- uses: actions/setup-go@v3
3538
with: { go-version: 1.x }
3639
- run: go mod download
37-
- run: ENVTEST_K8S_VERSION="${KUBERNETES#default}" QUERIES_CONFIG_DIR="${QUERIES_CONFIG_DIR}" make check-envtest
40+
- run: ENVTEST_K8S_VERSION="${KUBERNETES#default}" make check-envtest
3841
env:
3942
KUBERNETES: "${{ matrix.kubernetes }}"
4043
GO_TEST: go test --coverprofile 'envtest.coverage' --coverpkg ./internal/...
@@ -69,7 +72,7 @@ jobs:
6972
registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3
7073
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3
7174
72-
- run: QUERIES_CONFIG_DIR="${QUERIES_CONFIG_DIR}" make createnamespaces check-envtest-existing
75+
- run: make createnamespaces check-envtest-existing
7376
env:
7477
PGO_TEST_TIMEOUT_SCALE: 1.2
7578
GO_TEST: go test --coverprofile 'envtest-existing.coverage' --coverpkg ./internal/...

internal/controller/postgrescluster/pgmonitor_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ var (
4848
)
4949

5050
func TestAddPGMonitorExporterToInstancePodSpec(t *testing.T) {
51-
ctx := context.Background()
52-
5351
image := "test/image:tag"
5452

5553
cluster := &v1beta1.PostgresCluster{}
@@ -151,7 +149,7 @@ func TestAddPGMonitorExporterToInstancePodSpec(t *testing.T) {
151149

152150
var foundDefaultQueriesMount bool
153151
for _, vm := range container.VolumeMounts {
154-
if vm.Name == "exporter-queries" && vm.MountPath == pgmonitor.GetQueriesConfigDir(ctx) {
152+
if vm.Name == "exporter-queries" && vm.MountPath == "/opt/crunchy/conf" {
155153
foundDefaultQueriesMount = true
156154
break
157155
}

0 commit comments

Comments
 (0)