prometheus / compliance

A set of tests to check compliance with various Prometheus interfaces
Apache License 2.0
128 stars 45 forks source link

Update remote-writer-sender opentelemetry collector to reflect updates #65

Closed bmpandrade closed 2 years ago

bmpandrade commented 2 years ago

This PR tries to reflect a few changes:

  1. Update to latest of opentelemetry-collector
  2. Update the repository from where to fetch the release, since opentelemetry-collector-releases is now the source.
  3. Update the --metrics.addr=:0 to reflect the coming changes.

As a test, I used a run based on a single test, but the output was similar for the rest of the suite.

Using go test --tags=compliance -run "TestRemoteWrite/otelcollector/Gauge" -v ./

Go before the changes:

✓  go test --tags=compliance -run "TestRemoteWrite/otelcollector/Gauge" -v ./
=== RUN   TestRemoteWrite
=== RUN   TestRemoteWrite/otelcollector
=== RUN   TestRemoteWrite/otelcollector/Gauge
=== PAUSE TestRemoteWrite/otelcollector/Gauge
=== CONT  TestRemoteWrite/otelcollector/Gauge
Downloading https://github.com/open-telemetry/opentelemetry-collector/releases/download/v0.37.0/otelcol_darwin_amd64
    main_test.go:99:
            Error Trace:    main_test.go:99
                                        main_test.go:70
            Error:          Received unexpected error:
                            fork/exec : no such file or directory
            Test:           TestRemoteWrite/otelcollector/Gauge
--- FAIL: TestRemoteWrite (0.51s)
    --- FAIL: TestRemoteWrite/otelcollector (0.00s)
        --- FAIL: TestRemoteWrite/otelcollector/Gauge (0.51s)
FAIL
FAIL    github.com/prometheus/compliance/remote_write   1.291s
FAIL

After the changes:

✓  go test --tags=compliance -run "TestRemoteWrite/otelcollector/Gauge" -v ./
=== RUN   TestRemoteWrite
=== RUN   TestRemoteWrite/otelcollector
=== RUN   TestRemoteWrite/otelcollector/Gauge
=== PAUSE TestRemoteWrite/otelcollector/Gauge
=== CONT  TestRemoteWrite/otelcollector/Gauge
Downloading https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.42.0/otelcol_0.42.0_darwin_amd64.tar.gz
Decompressing /var/folders/6w/5pg5lc_d2vzbwn40xlb_44d80000gp/T/2524267209
Extracting otelcol
--- PASS: TestRemoteWrite (15.60s)
    --- PASS: TestRemoteWrite/otelcollector (0.00s)
        --- PASS: TestRemoteWrite/otelcollector/Gauge (15.59s)
PASS
ok      github.com/prometheus/compliance/remote_write   16.008s
bmpandrade commented 2 years ago

Sorry, I forgot to do the sign-off on the commit, there's way it shows above as force-pushed.