Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmd/opampsupervisor] Add integration/E2E tests #27002

Merged
merged 7 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 67 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
jobs:
docker-build:
collector-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -33,6 +33,40 @@ jobs:
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Build Collector
run: make otelcontribcol
- name: Upload Collector Binary
uses: actions/upload-artifact@v3
with:
name: collector-binary
path: ./bin/*
docker-build:
runs-on: ubuntu-latest
needs: collector-build
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Download Collector Binary
uses: actions/download-artifact@v3
with:
name: collector-binary
path: bin/
- name: Build Docker Image
run: |
make docker-otelcontribcol
Expand Down Expand Up @@ -107,3 +141,35 @@ jobs:
run: |
cd receiver/k8sobjectsreceiver
go test -v --tags=e2e
supervisor-test:
runs-on: ubuntu-latest
needs: collector-build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.8
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Download Collector Binary
uses: actions/download-artifact@v3
with:
name: collector-binary
path: bin/
- run: chmod +x bin/*
- name: Run opampsupervisor e2e tests
run: |
cd cmd/opampsupervisor
go test -v --tags=e2e

4 changes: 4 additions & 0 deletions cmd/opampsupervisor/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include ../../Makefile.Common

e2e-test:
make -C ../../ otelcontribcol
go test -v --tags=e2e .
Loading