(t *testing.T)
| 548 | } |
| 549 | |
| 550 | func TestIsPrefixSupported(t *testing.T) { |
| 551 | g := gomega.NewGomegaWithT(t) |
| 552 | prefixes := []string{ |
| 553 | "S3://", |
| 554 | "GCS://", |
| 555 | "HTTP://", |
| 556 | "HTTPS://", |
| 557 | } |
| 558 | scenarios := map[string]struct { |
| 559 | input string |
| 560 | expected bool |
| 561 | }{ |
| 562 | "SupportedPrefix": { |
| 563 | input: "GCS://test/model", |
| 564 | expected: true, |
| 565 | }, |
| 566 | "UnSupportedPreifx": { |
| 567 | input: "PVC://test/model", |
| 568 | expected: false, |
| 569 | }, |
| 570 | } |
| 571 | for name, scenario := range scenarios { |
| 572 | t.Run(name, func(t *testing.T) { |
| 573 | res := IsPrefixSupported(scenario.input, prefixes) |
| 574 | g.Expect(res).Should(gomega.Equal(scenario.expected)) |
| 575 | }) |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | func TestGetEnvVarValue(t *testing.T) { |
| 580 | g := gomega.NewGomegaWithT(t) |
nothing calls this directly
no test coverage detected