Skip to content

Commit

Permalink
[Builder]: Test with current head and latest release
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Feb 18, 2022
1 parent 70271f2 commit 0b19d20
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 64 deletions.
2 changes: 1 addition & 1 deletion cmd/builder/test/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
= Testing for the OpenTelemetry Collector Builder
# Testing for the OpenTelemetry Collector Builder

This is a set of end-to-end tests for the builder. As such, it includes only positive tests, based on the manifest files in this directory. Each manifest is expected to be in a working state and should yield an OpenTelemetry Collector instance that is ready within a time interval. "Ready" is defined by calling its healthcheck endpoint.
19 changes: 19 additions & 0 deletions cmd/builder/test/latest.builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
dist:
module: go.opentelemetry.io/collector/builder/test/core
otelcol_version: 0.44.0

extensions:
- import: go.opentelemetry.io/collector/extension/zpagesextension
gomod: go.opentelemetry.io/collector v0.44.0

receivers:
- import: go.opentelemetry.io/collector/receiver/otlpreceiver
gomod: go.opentelemetry.io/collector v0.44.0

exporters:
- import: go.opentelemetry.io/collector/exporter/loggingexporter
gomod: go.opentelemetry.io/collector v0.44.0

replaces:
- go.opentelemetry.io/collector => ../../../../
- go.opentelemetry.io/collector/model => ../../../../model
22 changes: 22 additions & 0 deletions cmd/builder/test/latest.otel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
extensions:
zpages:

receivers:
otlp:
protocols:
grpc:

processors:

exporters:
logging:

service:
extensions: [zpages]
pipelines:
traces:
receivers:
- otlp
processors: []
exporters:
- logging
22 changes: 0 additions & 22 deletions cmd/builder/test/replaces.builder.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions cmd/builder/test/replaces.otel.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions cmd/builder/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ echo "Using ${GOBIN} to compile the distributions."
# each attempt pauses for 100ms before retrying
max_retries=50

tests="replaces core"

base=`mktemp -d`
echo "Running the tests in ${base}"
tests="core latest"

failed=false
for test in $tests
do
out="${base}/${test}"
out="dist/${test}"
mkdir -p "${out}"
if [ $? != 0 ]; then
echo "❌ FAIL ${test}. Failed to create test directory for the test. Aborting tests."
Expand Down

0 comments on commit 0b19d20

Please sign in to comment.