(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestLoader(t *testing.T) { |
| 10 | |
| 11 | paths := []string{ |
| 12 | "../../examples/petstore-expanded/petstore-expanded.yaml", |
| 13 | "https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.4.1/examples/petstore-expanded/petstore-expanded.yaml", |
| 14 | } |
| 15 | |
| 16 | for _, v := range paths { |
| 17 | |
| 18 | swagger, err := util.LoadSwagger(v) |
| 19 | if err != nil { |
| 20 | t.Error(err) |
| 21 | } |
| 22 | if swagger == nil || swagger.Info == nil || swagger.Info.Version == "" { |
| 23 | t.Error("missing data") |
| 24 | } |
| 25 | } |
| 26 | } |
nothing calls this directly
no test coverage detected