(t *testing.T)
| 536 | } |
| 537 | |
| 538 | func TestExamples(t *testing.T) { |
| 539 | var testCases = []struct { |
| 540 | name string |
| 541 | file string |
| 542 | }{ |
| 543 | { |
| 544 | "simple", |
| 545 | "examples/simple.yml", |
| 546 | }, |
| 547 | { |
| 548 | "spread inserts", |
| 549 | "examples/spread.inserts.yml", |
| 550 | }, |
| 551 | { |
| 552 | "spread selects", |
| 553 | "examples/spread.selects.yml", |
| 554 | }, |
| 555 | { |
| 556 | "https", |
| 557 | "examples/https.yml", |
| 558 | }, |
| 559 | { |
| 560 | "combined", |
| 561 | "examples/combined.yml", |
| 562 | }, |
| 563 | } |
| 564 | |
| 565 | for _, tc := range testCases { |
| 566 | t.Run(tc.name, func(t *testing.T) { |
| 567 | _, err := LoadFile(tc.file) |
| 568 | if err != nil { |
| 569 | t.Fatalf("unexpected error: %s", err) |
| 570 | } |
| 571 | }) |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | func TestParseDuration(t *testing.T) { |
| 576 | var testCases = []struct { |
nothing calls this directly
no test coverage detected