diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 9589c7634..4bf989646 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -132,7 +132,7 @@ func TestLoadPropertiesFromFile(t *testing.T) { require.NoError(t, err) assert.Equal(t, "debug", viperInstance.GetString(LogLevelKey)) - assert.Equal(t, "./", viperInstance.GetString(LogPathKey)) + assert.Equal(t, "./test-path", viperInstance.GetString(LogPathKey)) assert.Equal(t, 15*time.Second, viperInstance.GetDuration(ClientKeepAliveTimeoutKey)) @@ -772,7 +772,6 @@ func createConfig() *Config { Server: &ServerConfig{ Host: "127.0.0.1", Port: 5643, - Type: 0, }, Authenticator: "test-saas-token", TLS: &TLSConfig{ @@ -788,7 +787,6 @@ func createConfig() *Config { Server: &ServerConfig{ Host: "127.0.0.1", Port: 1235, - Type: 0, }, TLS: &TLSConfig{ Cert: "/path/to/server-cert.pem", @@ -822,7 +820,6 @@ func createConfig() *Config { Server: &ServerConfig{ Host: "127.0.0.1", Port: 4317, - Type: 0, }, Auth: &AuthConfig{ Token: "secret-receiver-token", @@ -872,7 +869,6 @@ func createConfig() *Config { Server: &ServerConfig{ Host: "127.0.0.1", Port: 1337, - Type: 0, }, TLS: &TLSConfig{ Cert: "/path/to/server-cert.pem", @@ -926,5 +922,10 @@ func createConfig() *Config { MonitoringFrequency: 10 * time.Second, }, }, + Labels: map[string]any{ + "label1": "label 1", + "label2": "new-value", + "label3": 123, + }, } } diff --git a/internal/config/testdata/nginx-agent.conf b/internal/config/testdata/nginx-agent.conf index 6db2220d5..f138afac9 100644 --- a/internal/config/testdata/nginx-agent.conf +++ b/internal/config/testdata/nginx-agent.conf @@ -10,6 +10,11 @@ watchers: file_watcher: monitoring_frequency: 10s +labels: + label1: label 1 + label2: new-value + label3: 123 + data_plane_config: nginx: reload_monitoring_period: 30s @@ -46,7 +51,7 @@ command: server: host: "127.0.0.1" port: 8888 - type: 0 + type: grpc auth: token: "1234" tls: @@ -63,7 +68,6 @@ collector: - server: host: "127.0.0.1" port: 4317 - type: 0 auth: Token: "secret-receiver-token" tls: @@ -111,7 +115,6 @@ collector: server: host: "127.0.0.1" port: 1235 - type: 0 tls: server_name: "test-server" skip_verify: false @@ -129,7 +132,6 @@ collector: server: host: "127.0.0.1" port: 1337 - type: 0 path: "/test" tls: server_name: "server-name"