@@ -20,7 +20,7 @@ func TestClientAddCertificateBadConnection(t *testing.T) {
2020 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : "badness.incapsula.com" }
2121 client := & Client {config : config , httpClient : & http.Client {Timeout : time .Millisecond * 1 }}
2222 siteID := "1234"
23- addCertificateResponse , err := client .AddCertificate (siteID , "abc" , "def" , "efg" , "hij" )
23+ addCertificateResponse , err := client .AddCertificate (siteID , "abc" , "def" , "efg" , "RSA" , " hij" )
2424 if err == nil {
2525 t .Errorf ("Should have received an error" )
2626 }
@@ -46,7 +46,7 @@ func TestClientAddCertificateBadJSON(t *testing.T) {
4646 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
4747 client := & Client {config : config , httpClient : & http.Client {}}
4848 siteID := "1234"
49- addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "" )
49+ addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "RSA" , " " )
5050 if err == nil {
5151 t .Errorf ("Should have received an error" )
5252 }
@@ -72,7 +72,7 @@ func TestClientAddCertificateInvalidRule(t *testing.T) {
7272 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
7373 client := & Client {config : config , httpClient : & http.Client {}}
7474 siteID := "1234"
75- addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "" )
75+ addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "RSA" , " " )
7676 if err == nil {
7777 t .Errorf ("Should have received an error" )
7878 }
@@ -98,7 +98,7 @@ func TestClientAddCertificateValidRule(t *testing.T) {
9898 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
9999 client := & Client {config : config , httpClient : & http.Client {}}
100100 siteID := "1234"
101- addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "" )
101+ addCertificateResponse , err := client .AddCertificate (siteID , "" , "" , "" , "RSA" , " " )
102102 if err != nil {
103103 t .Errorf ("Should not have received an error" )
104104 }
@@ -197,7 +197,7 @@ func TestClientEditCertificateBadConnection(t *testing.T) {
197197 certificate := "foo"
198198 privateKey := "bar"
199199 passphrase := "loremipsum"
200- editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "" )
200+ editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "RSA" , " " )
201201 if err == nil {
202202 t .Errorf ("Should have received an error" )
203203 }
@@ -226,7 +226,7 @@ func TestClientEditCertificateBadJSON(t *testing.T) {
226226 certificate := "foo"
227227 privateKey := "bar"
228228 passphrase := "loremipsum"
229- editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "" )
229+ editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "RSA" , " " )
230230 if err == nil {
231231 t .Errorf ("Should have received an error" )
232232 }
@@ -255,7 +255,7 @@ func TestClientEditCertificateValidRule(t *testing.T) {
255255 certificate := "foo"
256256 privateKey := "bar"
257257 passphrase := "loremipsum"
258- editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "" )
258+ editCertificateResponse , err := client .EditCertificate (siteID , certificate , privateKey , passphrase , "RSA" , " " )
259259 if err != nil {
260260 t .Errorf ("Should not have received an error" )
261261 }
@@ -278,7 +278,7 @@ func TestClientDeleteCertificateBadConnection(t *testing.T) {
278278 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : "badness.incapsula.com" }
279279 client := & Client {config : config , httpClient : & http.Client {Timeout : time .Millisecond * 1 }}
280280 siteID := "1234"
281- err := client .DeleteCertificate (siteID )
281+ err := client .DeleteCertificate (siteID , "RSA" )
282282 if err == nil {
283283 t .Errorf ("Should have received an error" )
284284 }
@@ -301,7 +301,7 @@ func TestClientDeleteCertificateBadJSON(t *testing.T) {
301301 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
302302 client := & Client {config : config , httpClient : & http.Client {}}
303303 siteID := "1234"
304- err := client .DeleteCertificate (siteID )
304+ err := client .DeleteCertificate (siteID , "RSA" )
305305 if err == nil {
306306 t .Errorf ("Should have received an error" )
307307 }
@@ -324,7 +324,7 @@ func TestClientDeleteCertificateInvalidSiteID(t *testing.T) {
324324 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
325325 client := & Client {config : config , httpClient : & http.Client {}}
326326 siteID := "1234"
327- err := client .DeleteCertificate (siteID )
327+ err := client .DeleteCertificate (siteID , "RSA" )
328328 if err == nil {
329329 t .Errorf ("Should have received an error" )
330330 }
@@ -347,7 +347,7 @@ func TestClientDeleteCertificateValidSite(t *testing.T) {
347347 config := & Config {APIID : "foo" , APIKey : "bar" , BaseURL : server .URL }
348348 client := & Client {config : config , httpClient : & http.Client {}}
349349 siteID := "1234"
350- err := client .DeleteCertificate (siteID )
350+ err := client .DeleteCertificate (siteID , "RSA" )
351351 if err != nil {
352352 t .Errorf ("Should not have received an error" )
353353 }
0 commit comments