()
| 228 | type odinTestcases struct{} |
| 229 | |
| 230 | func (h odinTestcases) Execute() error { |
| 231 | token := os.Getenv("ODIN_API_KEY") |
| 232 | if token == "" { |
| 233 | return errors.New("missing odin api key") |
| 234 | } |
| 235 | odinToken := fmt.Sprintf(`odin: [%s]`, token) |
| 236 | if err := os.WriteFile(ConfigFile, []byte(odinToken), 0644); err != nil { |
| 237 | return err |
| 238 | } |
| 239 | defer func() { |
| 240 | _ = os.RemoveAll(ConfigFile) |
| 241 | }() |
| 242 | results, err := testutils.RunUncoverAndGetResults(debug, "-odin", "nginx") |
| 243 | |
| 244 | if err != nil { |
| 245 | return err |
| 246 | } |
| 247 | return expectResultsGreaterThanCount(results, 0) |
| 248 | } |
| 249 | |
| 250 | type binaryedgeTestcases struct{} |
| 251 |
nothing calls this directly
no test coverage detected