Skip to content

Commit

Permalink
Merge pull request #2101 from sgayangi/gayangi-test-check
Browse files Browse the repository at this point in the history
Update undeploy step in test cases
  • Loading branch information
Krishanx92 authored Mar 12, 2024
2 parents f24e62d + a13e033 commit e77cbef
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
name: "GraphQL API"
basePath: "/graphql"
basePath: "/graphql2"
version: "3.14"
type: "GRAPHQL"
id: "graphql-with-sub"
defaultVersion: false
subscriptionValidation: false
endpointConfigurations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "GraphQL API"
basePath: "/graphql"
version: "3.14"
type: "GRAPHQL"
id: "graphql-without-sub"
defaultVersion: false
subscriptionValidation: false
endpointConfigurations:
Expand Down
11 changes: 11 additions & 0 deletions test/cucumber-tests/src/test/resources/tests/api/GraphQL.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ Feature: Generating APK conf for GraphQL API
When I use the definition file "artifacts/definitions/invalid_graphql_api.graphql" in resources
And generate the APK conf file for a "GRAPHQL" API
Then the response status code should be 400

Scenario Outline: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "<apiID>"
Then the response status code should be <expectedStatusCode>

Examples:
| apiID | expectedStatusCode |
| graphql-with-sub | 202 |
| graphql-without-sub | 202 |
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 401 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-enabled"
Then the response status code should be 202

Expand All @@ -30,6 +34,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-enabled"
Then the response status code should be 202

Expand All @@ -45,6 +53,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-enabled"
Then the response status code should be 202

Expand All @@ -62,6 +74,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 401 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-enabled"
Then the response status code should be 202

Expand All @@ -77,6 +93,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-enabled"
Then the response status code should be 202

Expand All @@ -92,6 +112,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-enabled"
Then the response status code should be 202

Expand Down Expand Up @@ -136,6 +160,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 401 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-disabled"
Then the response status code should be 202

Expand All @@ -151,6 +179,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-disabled"
Then the response status code should be 202

Expand All @@ -164,6 +196,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-disabled"
Then the response status code should be 202

Expand All @@ -185,6 +221,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-disabled-oauth2-enabled"
Then the response status code should be 202

Expand Down Expand Up @@ -216,6 +256,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-enabled"
Then the response status code should be 202

Expand Down Expand Up @@ -246,6 +290,9 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |
When I undeploy the API whose ID is "mtls-multiple-certs"
Then the response status code should be 202

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-multiple-certs "
Then the response status code should be 202
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
| X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} |
And I eventually receive 200 response code, not accepting
| 401 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-optional"
Then the response status code should be 202

Expand All @@ -44,6 +48,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-optional"
Then the response status code should be 202

Expand All @@ -59,6 +67,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-mandatory-oauth2-optional"
Then the response status code should be 202

Expand All @@ -80,6 +92,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 401 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202

Expand All @@ -96,6 +112,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202

Expand All @@ -117,6 +137,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202

Expand All @@ -132,6 +156,10 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |

Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202

Expand All @@ -145,7 +173,9 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
And I eventually receive 401 response code, not accepting
| 200 |
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202


Scenario: Undeploy API
Given The system is ready
And I have a valid subscription
When I undeploy the API whose ID is "mtls-optional-oauth2-optional"
Then the response status code should be 202

0 comments on commit e77cbef

Please sign in to comment.