MCPcopy
hub / github.com/projectdiscovery/uncover / Execute

Method Execute

integration-tests/source-test.go:207–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205type googleTestcases struct{}
206
207func (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
228type odinTestcases struct{}
229

Callers

nothing calls this directly

Calls 2

RunUncoverAndGetResultsFunction · 0.92

Tested by

no test coverage detected