Skip to content

Commit

Permalink
[chore][CI/CD] Fix cloudflare receiver integration test (#32547)
Browse files Browse the repository at this point in the history
Fixed the expected file extension for golden metrics comparison in
cloudflare receiver integration test to be .yaml, not .json.

Due to the undocumented behavior of the Integration test Make tasks only
running tests containing the string 'Integration', this was broken when
golden metrics were changed in test from JSON to YAML in
#20438.


While the 'Integration' restriction is being addressed in
#32529,
in case that gets caught up in review or this limitation is accidentally
reintroduced I added 'Integration' to the name of the test, as well.

**Link to tracking Issue:**
#32532

**Testing:** Ran the test locally to confirm that the test runs
successfully.
  • Loading branch information
dehaansa committed Apr 19, 2024
1 parent d6292d0 commit 71dcf7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/cloudflarereceiver/logs_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var testPayloads = []string{
"multiple_log_payload",
}

func TestReceiverTLS(t *testing.T) {
func TestReceiverTLSIntegration(t *testing.T) {
for _, payloadName := range testPayloads {
t.Run(payloadName, func(t *testing.T) {
testAddr := testutil.GetAvailableLocalAddress(t)
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestReceiverTLS(t *testing.T) {

logs := sink.AllLogs()[0]

expectedLogs, err := golden.ReadLogs(filepath.Join("testdata", "processed", fmt.Sprintf("%s.json", payloadName)))
expectedLogs, err := golden.ReadLogs(filepath.Join("testdata", "processed", fmt.Sprintf("%s.yaml", payloadName)))
require.NoError(t, err)

require.NoError(t, plogtest.CompareLogs(expectedLogs, logs, plogtest.IgnoreObservedTimestamp()))
Expand Down

0 comments on commit 71dcf7a

Please sign in to comment.