-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (55 loc) · 1.96 KB
/
otel-integration-e2e-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Otel Integration Helm Lint And Install Test
on:
pull_request:
paths:
- 'otel-integration/k8s-helm/**'
jobs:
otel-integration-agent-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Setup cluster
uses: ./.github/actions/setup
with:
create-kind-cluster: "true"
cluster-name: "otel-integration-agent-e2e"
- name: Save kubeconfig to file
run: |
kubectl config view --raw > /tmp/kind-otel-integration-agent-e2e
echo "KUBECONFIG=/tmp/kind-otel-integration-agent-e2e" >> $GITHUB_ENV
- name: Get and Set Kind HostEndpoint as env variable
shell: bash
run: |
cd ./otel-integration/k8s-helm/e2e-test/testcommon
chmod +x ./get_host_endpoint.sh
./get_host_endpoint.sh
- name: Setup Secret
run: kubectl create secret generic coralogix-keys --from-literal=PRIVATE_KEY=123
- name: Install chart for testing
env:
HOSTENDPOINT: ${{ env.HOSTENDPOINT }}
KUBECONFIG: ${{ env.KUBECONFIG }}
run: |
cd ./otel-integration/k8s-helm
helm dependency build
helm upgrade --install otel-integration-agent-e2e . \
--set global.clusterName="otel-integration-agent-e2e" \
--set global.domain="coralogix.com" \
--set global.hostedEndpoint=$HOSTENDPOINT \
-f ./values.yaml \
-f ./e2e-test/testdata/values-e2e-test.yaml
kubectl wait --all --for=condition=ready --timeout=300s pod -l component=agent-collector
- name: Run E2E test
env:
HOSTENDPOINT: ${{ env.HOSTENDPOINT }}
KUBECONFIG: ${{ env.KUBECONFIG }}
run: |
cd ./otel-integration/k8s-helm/e2e-test/
go test -v -run=TestE2E_Agent ./...