@ -17,7 +17,6 @@ import (
const testFile = `
clients :
clients :
- external_labels :
cluster : dev1
url : https : //1:shh@example.com/loki/api/v1/push
@ -37,6 +36,8 @@ scrape_configs:
limit_config :
readline_rate : 100
readline_burst : 200
options :
stream_lag_labels : foo
`
func Test_Load ( t * testing . T ) {
@ -64,9 +65,7 @@ func TestConfig_Setup(t *testing.T) {
ClientConfig : client . Config {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "foo" : "bar" } } ,
} ,
ClientConfigs : client . Configs {
StreamLagLabels : [ ] string { } ,
Configs : [ ] client . Config {
ClientConfigs : [ ] client . Config {
{
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client1" : "1" } } ,
} ,
@ -74,15 +73,15 @@ func TestConfig_Setup(t *testing.T) {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client2" : "2" } } ,
} ,
} ,
Options : Options {
StreamLagLabels : [ ] string { } ,
} ,
} ,
Config {
ClientConfig : client . Config {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "foo" : "bar" } } ,
} ,
ClientConfigs : client . Configs {
StreamLagLabels : [ ] string { } ,
Configs : [ ] client . Config {
ClientConfigs : [ ] client . Config {
{
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client1" : "1" , "foo" : "bar" } } ,
} ,
@ -90,6 +89,8 @@ func TestConfig_Setup(t *testing.T) {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client2" : "2" , "foo" : "bar" } } ,
} ,
} ,
Options : Options {
StreamLagLabels : [ ] string { } ,
} ,
} ,
} ,
@ -99,9 +100,7 @@ func TestConfig_Setup(t *testing.T) {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "foo" : "bar" } } ,
URL : dskitflagext . URLValue { URL : mustURL ( "http://foo" ) } ,
} ,
ClientConfigs : client . Configs {
StreamLagLabels : [ ] string { } ,
Configs : [ ] client . Config {
ClientConfigs : [ ] client . Config {
{
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client1" : "1" } } ,
} ,
@ -109,6 +108,8 @@ func TestConfig_Setup(t *testing.T) {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client2" : "2" } } ,
} ,
} ,
Options : Options {
StreamLagLabels : [ ] string { } ,
} ,
} ,
Config {
@ -116,9 +117,7 @@ func TestConfig_Setup(t *testing.T) {
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "foo" : "bar" } } ,
URL : dskitflagext . URLValue { URL : mustURL ( "http://foo" ) } ,
} ,
ClientConfigs : client . Configs {
StreamLagLabels : [ ] string { } ,
Configs : [ ] client . Config {
ClientConfigs : [ ] client . Config {
{
ExternalLabels : flagext . LabelSet { LabelSet : model . LabelSet { "client1" : "1" , "foo" : "bar" } } ,
} ,
@ -130,6 +129,8 @@ func TestConfig_Setup(t *testing.T) {
URL : dskitflagext . URLValue { URL : mustURL ( "http://foo" ) } ,
} ,
} ,
Options : Options {
StreamLagLabels : [ ] string { } ,
} ,
} ,
} ,