()
| 205 | type googleTestcases struct{} |
| 206 | |
| 207 | func (h googleTestcases) Execute() error { |
| 208 | token := os.Getenv("GOOGLE_API_KEY") |
| 209 | if token == "" { |
| 210 | return errors.New("missing google api key") |
| 211 | } |
| 212 | engineId := os.Getenv("GOOGLE_API_CX") |
| 213 | if engineId == "" { |
| 214 | return errors.New("missing google engine id") |
| 215 | } |
| 216 | googleToken := fmt.Sprintf(`google: [%s,%s]`, token, engineId) |
| 217 | _ = os.WriteFile(ConfigFile, []byte(googleToken), 0644) |
| 218 | defer func() { |
| 219 | _ = os.RemoveAll(ConfigFile) |
| 220 | }() |
| 221 | results, err := testutils.RunUncoverAndGetResults(debug, "-google", "site:*.hackerone.com") |
| 222 | if err != nil { |
| 223 | return err |
| 224 | } |
| 225 | return expectResultsGreaterThanCount(results, 0) |
| 226 | } |
| 227 | |
| 228 | type odinTestcases struct{} |
| 229 |
nothing calls this directly
no test coverage detected