Skip to content

Commit

Permalink
fix logging config unit tests (#267)
Browse files Browse the repository at this point in the history
Co-authored-by: Herve Nicol <[email protected]>
Co-authored-by: Quentin Bisson <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent e526e78 commit ac4008c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Disable grafana agent usage data reporting.

### Fixed

- Fix logging-config unit tests

## [0.15.2] - 2024-11-13

### Added
Expand Down
5 changes: 2 additions & 3 deletions pkg/resource/logging-config/alloy-logging-config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ func TestGenerateAlloyLoggingConfig(t *testing.T) {
t.Fatalf("Failed to generate alloy config: %v", err)
}

//fmt.Printf("=>> config\n%s", config)
//fmt.Printf("=>> config_v170_MC\n%s", config_v170_MC)
if !cmp.Equal(string(golden), config) {
if string(golden) != config {
t.Logf("Generated config differs from %s, diff:\n%s", tc.goldenFile, cmp.Diff(string(golden), config))
t.Fail()
if *update {
//nolint:gosec
if err := os.WriteFile(tc.goldenFile, []byte(config), 0644); err != nil {
Expand Down

0 comments on commit ac4008c

Please sign in to comment.