(t *testing.T)
| 390 | } |
| 391 | |
| 392 | func TestMigrateConfigEndToEnd(t *testing.T) { |
| 393 | tests := []struct { |
| 394 | name string |
| 395 | inputFile string |
| 396 | expectedFile string |
| 397 | kafkaAddress string |
| 398 | kafkaTopic string |
| 399 | mode string |
| 400 | expectErr bool |
| 401 | expectErrContain string |
| 402 | }{ |
| 403 | { |
| 404 | name: "monolithic basic", |
| 405 | inputFile: "test-data/migrate-config/monolithic-basic-input.yaml", |
| 406 | expectedFile: "test-data/migrate-config/monolithic-basic-expected.yaml", |
| 407 | }, |
| 408 | { |
| 409 | name: "microservices basic", |
| 410 | inputFile: "test-data/migrate-config/microservices-basic-input.yaml", |
| 411 | expectedFile: "test-data/migrate-config/microservices-basic-expected.yaml", |
| 412 | kafkaAddress: "kafka:9092", |
| 413 | kafkaTopic: "tempo-traces", |
| 414 | }, |
| 415 | { |
| 416 | name: "no target field defaults to monolithic", |
| 417 | inputFile: "test-data/migrate-config/no-target-input.yaml", |
| 418 | expectedFile: "test-data/migrate-config/no-target-expected.yaml", |
| 419 | }, |
| 420 | { |
| 421 | name: "with local-blocks processor", |
| 422 | inputFile: "test-data/migrate-config/with-local-blocks-input.yaml", |
| 423 | expectedFile: "test-data/migrate-config/with-local-blocks-expected.yaml", |
| 424 | }, |
| 425 | { |
| 426 | name: "with per-tenant override config", |
| 427 | inputFile: "test-data/migrate-config/with-per-tenant-override-config-input.yaml", |
| 428 | expectedFile: "test-data/migrate-config/with-per-tenant-override-config-expected.yaml", |
| 429 | }, |
| 430 | { |
| 431 | name: "with env vars preserves them", |
| 432 | inputFile: "test-data/migrate-config/with-env-vars-input.yaml", |
| 433 | expectedFile: "test-data/migrate-config/with-env-vars-expected.yaml", |
| 434 | }, |
| 435 | { |
| 436 | name: "scalable-single-binary is rewritten to all", |
| 437 | inputFile: "test-data/migrate-config/scalable-single-binary-input.yaml", |
| 438 | expectedFile: "test-data/migrate-config/scalable-single-binary-expected.yaml", |
| 439 | }, |
| 440 | { |
| 441 | name: "legacy overrides errors", |
| 442 | inputFile: "test-data/migrate-config/legacy-overrides-input.yaml", |
| 443 | expectErr: true, |
| 444 | expectErrContain: "legacy overrides format detected", |
| 445 | }, |
| 446 | { |
| 447 | name: "microservices without kafka-address errors", |
| 448 | inputFile: "test-data/migrate-config/microservices-basic-input.yaml", |
| 449 | expectErr: true, |
nothing calls this directly
no test coverage detected