Skip to content

Commit

Permalink
internal/resource: Fix metrics subsystem value for lighthouses
Browse files Browse the repository at this point in the history
The configuration specifies metrics subsystem as `host` instead of the expected `lighthouse`.
  • Loading branch information
janartodesk committed Nov 28, 2024
1 parent e3b96ee commit 023e1aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/resource/lighthouse/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ var _ = DescribeTable("host metrics exporter configuration management",
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("listen"), knownvalue.StringExact("127.0.0.1:8080")),
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("path"), knownvalue.StringExact("/metrics")),
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("namespace"), knownvalue.StringExact("nebula")),
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("subsystem"), knownvalue.StringExact("host")),
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("subsystem"), knownvalue.StringExact("lighthouse")),
statecheck.ExpectKnownValue("definednet_lighthouse.metrics_default_test", tfjsonpath.New("metrics").AtMapKey("enable_extra_metrics"), knownvalue.Bool(false)),
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/resource/lighthouse/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var Schema = schema.Schema{
Description: "Prometheus metrics' subsystem",
Optional: true,
Computed: true,
Default: stringdefault.StaticString("host"),
Default: stringdefault.StaticString("lighthouse"),
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
Expand Down

0 comments on commit 023e1aa

Please sign in to comment.