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

tests: add basic test for workload lifecycle #1526

Merged
merged 21 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d57bc21
tests: add basic test for workload lifecycle
blumamir Sep 20, 2024
20a9947
chore: rename workload name
blumamir Sep 20, 2024
9ecccc3
test: add test from runtime version not detected
blumamir Sep 20, 2024
32b1110
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 20, 2024
609442f
test: add assertions for nodejs-very-old-version
blumamir Sep 20, 2024
b2fac43
feat: add template for nodejs minimum version e2e scenario
blumamir Sep 20, 2024
6d6890c
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 20, 2024
2d76c74
test: assert nodejs-minimum-version
blumamir Sep 20, 2024
083f64d
test: genrate traffic and test trace is created
blumamir Sep 21, 2024
8af3725
test: add nodejs-latest-version test case
blumamir Sep 21, 2024
e47302c
test: add cpp-http-server scenario to e2e test
blumamir Sep 21, 2024
71f7cc3
fix: cpp http server test sceario compilation issue
blumamir Sep 21, 2024
1d9f5a4
test: add nodejs-docker-env scenario
blumamir Sep 21, 2024
18c8719
test: dockerfile use another node option other than require
blumamir Sep 21, 2024
b0305aa
test: add workload for nodejs-manifest-env
blumamir Sep 21, 2024
3d191c6
test: add new step to update the workload manifests
blumamir Sep 21, 2024
497fe32
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 21, 2024
a023a24
step 02 - update workload manifests
blumamir Sep 21, 2024
9e3f112
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 21, 2024
a7b9496
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 23, 2024
5b2f838
Merge remote-tracking branch 'upstream/main' into e2e-workload-lifecycle
blumamir Sep 25, 2024
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
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
frontend/node_modules
frontend/webapp/node_modules
.git/
Dockerfile
odiglet/Dockerfile
odiglet/base.Dockerfile
odiglet/debug.Dockerfile
tests # not needed in context for odigos components builds
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
- "helm-chart"
- "fe-synthetic"
- "cli-upgrade"
- "workload-lifecycle"
include:
- kube-version: "1.23"
kind-image: "kindest/node:v1.23.17@sha256:14d0a9a892b943866d7e6be119a06871291c517d279aedb816a4b4bc0ec0a5b3"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ dev-tests-setup: dev-tests-kind-cluster cli-build build-images load-to-kind
# Use this target to avoid rebuilding the images if all that changed is the e2e test code
.PHONY: dev-tests-setup-no-build
dev-tests-setup-no-build: TAG := e2e-test
dev-tests-setup-no-build: dev-tests-kind-cluster load-to-kind
dev-tests-setup-no-build: dev-tests-kind-cluster load-to-kind
1 change: 1 addition & 0 deletions tests/e2e/multi-apps/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ spec:
timeout: 60s
content: |
../../common/ui-tests/stop_ui_and_clean.sh

12 changes: 12 additions & 0 deletions tests/e2e/workload-lifecycle/01-add-destination.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: odigos.io/v1alpha1
kind: Destination
metadata:
name: odigos.io.dest.tempo-123123
namespace: odigos-system
spec:
data:
TEMPO_URL: e2e-tests-tempo.traces:4317
destinationName: e2e-tests
signals:
- TRACES
type: tempo
98 changes: 98 additions & 0 deletions tests/e2e/workload-lifecycle/01-assert-apps-installed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-unsupported-version
namespace: default
status:
containerStatuses:
- name: nodejs-unsupported-version
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-very-old-version
namespace: default
status:
containerStatuses:
- name: nodejs-very-old-version
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-minimum-version
namespace: default
status:
containerStatuses:
- name: nodejs-minimum-version
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-latest-version
namespace: default
status:
containerStatuses:
- name: nodejs-latest-version
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-dockerfile-env
namespace: default
status:
containerStatuses:
- name: nodejs-dockerfile-env
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: nodejs-manifest-env
namespace: default
status:
containerStatuses:
- name: nodejs-manifest-env
ready: true
restartCount: 0
started: true
phase: Running
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: cpp-http-server
namespace: default
status:
containerStatuses:
- name: cpp-http-server
ready: true
restartCount: 0
started: true
phase: Running
---
174 changes: 174 additions & 0 deletions tests/e2e/workload-lifecycle/01-assert-instrumented.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-unsupported-version
status:
conditions:
- message: "javascript runtime version not supported by OpenTelemetry SDK. Found:
8.17.0, supports: 14.0.0"
observedGeneration: 1
reason: RuntimeVersionNotSupported
status: "False"
type: AppliedInstrumentationDevice
---
# expecting injection of instrumentation device to be successful since the runtime version was not detected
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-very-old-version
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
# expecting injection of instrumentation device to be successful since the runtime version is supported
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-minimum-version
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentationInstance
metadata:
namespace: default
labels:
instrumented-app: deployment-nodejs-minimum-version
status:
healthy: true
identifyingAttributes:
- key: service.instance.id
(value != null): true
- key: telemetry.sdk.language
value: nodejs
- key: process.runtime.version
value: "14.0.0"
- key: telemetry.distro.version
value: e2e-test
- key: process.pid
(value != null): true
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-latest-version
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentationInstance
metadata:
namespace: default
labels:
instrumented-app: deployment-nodejs-latest-version
status:
healthy: true
identifyingAttributes:
- key: service.instance.id
(value != null): true
- key: telemetry.sdk.language
value: nodejs
- key: process.runtime.version
(value != null): true
- key: telemetry.distro.version
value: e2e-test
- key: process.pid
(value != null): true
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-dockerfile-env
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentationInstance
metadata:
namespace: default
labels:
instrumented-app: deployment-nodejs-dockerfile-env
status:
healthy: true
identifyingAttributes:
- key: service.instance.id
(value != null): true
- key: telemetry.sdk.language
value: nodejs
- key: process.runtime.version
value: "20.17.0"
- key: telemetry.distro.version
value: e2e-test
- key: process.pid
(value != null): true
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-nodejs-manifest-env
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentationInstance
metadata:
namespace: default
labels:
instrumented-app: deployment-nodejs-manifest-env
status:
healthy: true
identifyingAttributes:
- key: service.instance.id
(value != null): true
- key: telemetry.sdk.language
value: nodejs
- key: process.runtime.version
value: "20.17.0"
- key: telemetry.distro.version
value: e2e-test
- key: process.pid
(value != null): true
---
apiVersion: odigos.io/v1alpha1
kind: InstrumentedApplication
metadata:
namespace: default
name: deployment-cpp-http-server
status:
conditions:
- message: "Instrumentation device applied successfully"
observedGeneration: 1
reason: InstrumentationDeviceApplied
status: "True"
type: AppliedInstrumentationDevice
---
Loading
Loading