(t *testing.T)
| 239 | } |
| 240 | |
| 241 | func TestLimitsLoadingFromYaml(t *testing.T) { |
| 242 | SetDefaultLimitsForYAMLUnmarshalling(Limits{ |
| 243 | MaxLabelNameLength: 100, |
| 244 | }) |
| 245 | |
| 246 | inp := `ingestion_rate: 0.5` |
| 247 | |
| 248 | l := Limits{} |
| 249 | err := yaml.UnmarshalStrict([]byte(inp), &l) |
| 250 | require.NoError(t, err) |
| 251 | |
| 252 | assert.Equal(t, 0.5, l.IngestionRate, "from yaml") |
| 253 | assert.Equal(t, 100, l.MaxLabelNameLength, "from defaults") |
| 254 | } |
| 255 | |
| 256 | func TestLimitsLoadingFromJson(t *testing.T) { |
| 257 | SetDefaultLimitsForYAMLUnmarshalling(Limits{ |
nothing calls this directly
no test coverage detected