Skip to content

Commit

Permalink
[chore]Use Right file name for the prometheus compliance tests (#24729)
Browse files Browse the repository at this point in the history
This PR fixes the right file name for running the prometheus compliance
tests.
The actual name of [downloaded
artifact](https://github.com/prometheus/compliance/blob/main/remote_write_sender/targets/otel.go#L8)
as part of the test is `otelcol_0.42.0_linux_amd64`. when we place the
collector contrib artefact under the same name in the bin folder with
the name `otelcol_linux_amd64` the tests will still be run on
otelcol_0.42.0_linux_amd64 artefact. so by [changing the
name](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/24729/files#diff-905ac35df46c393cbd15f24e4921ead35720be7e2c9a9372000811293f96f427R49)
of the artefact, the tests will run on top of that.

**Additional Context** :

We shall need to track this issue
prometheus/compliance#97 as the naming
conventions of the artifacts used in the target could be changed upon
the issue resolution

No ChangeLog entry is needed.

---------

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
  • Loading branch information
vasireddy99 and Aneurysm9 authored Sep 6, 2023
1 parent 8480349 commit de60682
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ jobs:
with:
repository: prometheus/compliance
path: compliance
ref: f0482884578bac67b053e3eaa1ca7f783d146557
- name: Copy binary to compliance directory
run: mkdir compliance/remote_write_sender/bin && cp opentelemetry-collector-contrib/bin/otelcontribcol_linux_amd64 compliance/remote_write_sender/bin/otelcol_linux_amd64
# The required name of the downloaded artifact is `otelcol_0.42.0_linux_amd64`, so we place the collector contrib artifact under the same name in the bin folder to run.
# Source: https://github.com/prometheus/compliance/blob/12cbdf92abf7737531871ab7620a2de965fc5382/remote_write_sender/targets/otel.go#L8
run: mkdir compliance/remote_write_sender/bin && cp opentelemetry-collector-contrib/bin/otelcontribcol_linux_amd64 compliance/remote_write_sender/bin/otelcol_0.42.0_linux_amd64
- name: Run compliance tests
run: go test -v --tags=compliance -run "TestRemoteWrite/otel/.+" ./ |& tee ./test-report.txt
working-directory: compliance/remote_write_sender

0 comments on commit de60682

Please sign in to comment.