From b7a32d70dca21ce1943da59c01655969b458cf19 Mon Sep 17 00:00:00 2001 From: Nate Johnston Date: Thu, 31 May 2018 20:54:49 +0000 Subject: [PATCH] test user Change-Id: I89acf4256010e00c0d114a723cf87ee384bf6094 --- qualys/scans_test.go | 71 --------------------------------- qualys/xml/scan_list_output.xml | 4 +- 2 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 qualys/scans_test.go diff --git a/qualys/scans_test.go b/qualys/scans_test.go deleted file mode 100644 index b05ce2d..0000000 --- a/qualys/scans_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package qualys - -import ( - "net/http" - "net/url" - "testing" - "time" -) - -var devCreds Credentials = Credentials{ - Username: "cmcas_ae2", - Password: "D02debLYko", -} - -func TestLiveScan(t *testing.T) { - // create client - c, clientErr := NewClient(&http.Client{}, &devCreds) - - if clientErr != nil { - t.Error(clientErr) - } - - if baseURL, err := url.Parse("https://qualysapi.qualys.com/api/2.0/fo/scan/"); err != nil { - t.Error(err) - } else { - c.BaseURL = baseURL - } - - // create the options - opts := LaunchScanOptions{ - ScanTitle: "hello_world", - ScannerName: "External", - // OptionID: 923922, - OptionTitle: "Elastic Cloud Option Profile with Password Guessing", - IP: []string{"96.119.99.178"}, - } - - // launch the request - - launchScanResponse, err := c.LaunchScan(&opts) - - if err != nil { - t.Error(err) - } - - // not sure if necessary - time.Sleep(time.Minute * 1) - - //time to poll the scan results - pollOpts := PollScanOptions{ - ScanRef: launchScanResponse.ScanReference, - } - - _, pollRespErr := c.PollScanResults(&pollOpts) - - if pollRespErr != nil { - t.Error(pollRespErr) - } - - // now need to keep polling until the results are all in... - - resultsOptions := CompletedScanOptions{ - ScanRef: launchScanResponse.ScanReference, - } - - _, resultsRespErr := c.GetScanResults(&resultsOptions) - - if resultsRespErr != nil { - t.Error(resultsRespErr) - } -} diff --git a/qualys/xml/scan_list_output.xml b/qualys/xml/scan_list_output.xml index 3ffa0e2..e220f35 100644 --- a/qualys/xml/scan_list_output.xml +++ b/qualys/xml/scan_list_output.xml @@ -8,7 +8,7 @@ scan/1486045714.48615 API <![CDATA[Elastic Cloud Automated Scan]]> - cmcas_at1 + testuser 2017-02-02T14:28:34Z 00:08:44 0 - No Priority @@ -20,4 +20,4 @@ - \ No newline at end of file +