Skip to content

Commit fc8e92c

Browse files
committed
Fix: Create a fake kubeconfig for data_collector instantiation
1 parent 7524da1 commit fc8e92c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/unit-tests.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: unit-tests
1+
name: Unit Tests
22
permissions:
33
contents: read
44

@@ -18,6 +18,29 @@ jobs:
1818
with:
1919
go-version: "1.24"
2020

21+
- name: Create fake kube config
22+
run: |
23+
mkdir -p /home/runner/.kube
24+
cat <<EOF > /home/runner/.kube/config
25+
apiVersion: v1
26+
kind: Config
27+
preferences: {}
28+
clusters:
29+
- cluster:
30+
server: https://fake-server
31+
certificate-authority-data: FAKE
32+
name: fake-cluster
33+
contexts:
34+
- context:
35+
cluster: fake-cluster
36+
user: fake-user
37+
name: fake-context
38+
current-context: fake-context
39+
users:
40+
- name: fake-user
41+
user:
42+
token: FAKE
43+
EOF
2144
- name: Run Unit Tests
2245
run: |
2346
go clean -testcache && go test -v ./... -coverprofile=coverage.out

0 commit comments

Comments
 (0)