Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chrloch committed Apr 8, 2022
2 parents 2d77684 + 6e9c377 commit 2334702
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 11 deletions.
5 changes: 5 additions & 0 deletions specs/gateway/Certificates/CreateCertificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:

Upload a DSC for a country

* Reference "TXR-2059"
* create a valid DSC
* sign DSC with UPLOAD certificate
* upload DSC
Expand All @@ -22,6 +23,7 @@ tags: negative_test

Upload a DSC of a country with an unauthorized client certificate. The response should be with the status code 401 Unauthorized

* Reference "TXR-2060"
* create a valid DSC
* sign DSC with UPLOAD certificate
* create custom authentication certificate
Expand All @@ -35,6 +37,7 @@ tags: negative_test

Upload a DSC signed with CSCA certificate of a different country. The response code should be 400

* Reference "TXR-2061"
* create a DSC for another country
* sign DSC with UPLOAD certificate of another country
* upload DSC
Expand All @@ -47,6 +50,7 @@ tags: negative_test

Upload a DSC of a country with the wrong format to trigger Error Code 400

* Reference "TXR-2062"
* create a valid DSC
* upload unsigned DSC
* check that the response had an error
Expand All @@ -58,6 +62,7 @@ tags: negative_test

Upload a DSC of a country with a UUID which is already in the database. The API should respond with the error Code 409.

* Reference "TXR-2063"
* create a valid DSC
* sign DSC with UPLOAD certificate
* upload DSC
Expand Down
6 changes: 5 additions & 1 deletion specs/gateway/Certificates/DeleteCertificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:

Delete a DSC certificate of a country

* Reference "TRX-2065"
* create a valid DSC
* sign DSC with UPLOAD certificate
* upload DSC
Expand All @@ -25,6 +26,7 @@ tags:

Delete a DSC certificate of a country by using the POST endpoint. This is used so that a body can be used in a POST request instead of a DELETE request.

* Reference "TXR-3200"
* create a valid DSC
* sign DSC with UPLOAD certificate
* upload DSC
Expand All @@ -38,9 +40,9 @@ Delete a DSC certificate of a country by using the POST endpoint. This is used s

tags: negative_test


Delete a DSC of a country with an unauthorized client certificate.

* Reference "TXR-2069"
* get the trustList with the type "DSC"
* create custom authentication certificate
* delete random DSC with custom client certificate
Expand All @@ -53,6 +55,7 @@ tags: negative_test

delete a DSC of another country with the client certificate not authorized to change a DSC of that country. The error code should be 400 "Bad Request"

* Reference "TXR-2070"
* get the trustList with the type "DSC"
* get random DSC from trustlist from another country
* delete DSC from another country
Expand All @@ -65,6 +68,7 @@ tags: negative_test

delete a DSC of a country which is not in the database. The error code should be 400 "Bad Request"

* Reference "TXR-2066"
* create a valid DSC
* sign DSC with UPLOAD certificate
* delete DSC created
30 changes: 27 additions & 3 deletions specs/gateway/Certificates/DeltaDownload.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,52 @@ Test data for DSC download:
|DSC |DE |

## Pagination full trust list

Load the full trust list in different paginations.
Finally, compare the downloaded lists and check that they have the same content.

* Reference "TXR-6359"
* load unfiltered trust list with pagination size "50"
* load unfiltered trust list with pagination size "80"
* compare downloaded trust lists

## Pagination trust list by type

Load the trust list filtered by type in different paginations.
Finally, compare the downloaded lists and check that they have the same content.

* Reference "TXR-6423"
* load <type> trust list with pagination size "10"
* load <type> trust list with pagination size "20"
* compare downloaded trust lists

## Pagination trust list by type and country

Load the trust list filtered by type and country in different paginations.
Finally, compare the downloaded lists and check that they have the same content.

* Reference "TXR-6429"
* load <type> trust list of <country> with pagination size "10"
* load <type> trust list of <country> with pagination size "20"
* compare downloaded trust lists

## Date formats

Check that both ISO 8601 and RFC 2616 date formats are accepted

* Reference "TXR-6427"
* load trust list last modified "30" days ago date format "ISO 8601"
* check that the response had no error
* Reference "TXR-6426"
* load trust list last modified "30" days ago date format "RFC 2616"
* check that the response had no error
* Reference "TXR-6428"
* load trust list last modified "30" days ago date format "SHORT"
* check that the response had no error
* compare downloaded trust lists

## Pagination Default Values

Check that the default values for page size and page number are
used when one of the parameters is missing.

* Reference "TXR-6430"
* load trust list last modified "60" days ago page "0" size "100"
* check that the response had no error
Expand All @@ -50,6 +66,10 @@ Test data for DSC download:
* compare downloaded trust lists

## Pagination is optional

Check that pagination is optional and when no pagination is requested,
the full trust list is returned (backwards compatibility)

* Reference "TXR-"
* load trust list last modified "60" days ago page "0" size "10"
* check that the response had no error
Expand All @@ -59,6 +79,10 @@ Test data for DSC download:


## Changes in Trust List

A freshly uploaded DSC should appear in the trust list and if it is deleted, a deletion entry should appear in its place.
When the same DSC is uploaded then again, it should be accepted and re-appear in the trust list, replacing the deletion entry.

* Reference "TXR-6424"
* create a valid DSC
* sign DSC with UPLOAD certificate
Expand Down
3 changes: 3 additions & 0 deletions specs/gateway/Certificates/GetTrustList.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ all test cases for getting the DSC (Signing Certificates)

Get all trusted public keys

* Reference "TXR-2071"
* create a valid DSC
* sign DSC with UPLOAD certificate
* check that DSC is not in trustlist
Expand All @@ -26,6 +27,7 @@ Get all trusted public keys

get all trusted public keys of a specific type

* Reference "TXR-2072"
* get the trustList with the type <type>
* check that the response had no error
* check that only entries of the type <type> are present
Expand All @@ -34,6 +36,7 @@ get all trusted public keys of a specific type

get all trusted public keys of a specific type and country

* Reference "TXR-2973"
* get the trustList with the type <type> and country <country>
* check that the response had no error
* check that only entries of the type <type> and <country> are present
5 changes: 5 additions & 0 deletions specs/gateway/Rules/DeleteRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Test for deletion of the rules

Delete a Rule.

* Reference "TXR-2870"
* create a valid <Ruletype> Rule
* upload Rule
* check that Rule is in Rulelist
Expand All @@ -24,6 +25,7 @@ Delete a Rule.

Delete a Rule by using the POST endpoint. This is used so that a body can be used in a POST request instead of a DELETE request.

* Reference "TXR-3199"
* create a valid <Ruletype> Rule
* upload Rule
* check that Rule is in Rulelist
Expand All @@ -37,6 +39,7 @@ tags: negative_test

Delete a Rule of another country. This should not be possible.

* Reference "TXR-2872"
* create a valid <Ruletype> Rule
* upload Rule
* check that Rule is in Rulelist
Expand All @@ -51,6 +54,7 @@ tags: negative_test

Delete a Rule with unauthenticated certificate. This should not be possible.

* Reference "TXR-2873"
* create a valid <Ruletype> Rule
* upload Rule
* check that Rule is in Rulelist
Expand All @@ -66,5 +70,6 @@ tags: negative_test

Delete a Rule which is not in the database. There should be an error in that case.

* Reference "TXR-2874"
* delete Rule not in rulelist
* check that the response had an error
4 changes: 4 additions & 0 deletions specs/gateway/Rules/GetRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All Tests for downloading Rules from the Gateway

Get all onboarded countries. Should have at least the own country in the list.

* Reference "TXR-2866"
* get all onboarded countries
* check that the response had no error
* check that the response had the status code "200"
Expand All @@ -19,6 +20,7 @@ tags: negative_test

Get all onboarded countries with unauthenticated NBTLS. Should lead to an error.

* Reference "TXR-2868"
* create custom authentication certificate
* get all onboarded countries with custom certificate
* check that the response had an error
Expand All @@ -28,6 +30,7 @@ Get all onboarded countries with unauthenticated NBTLS. Should lead to an error.

Download Rules of all Countries.

* Reference "TXR-2867"
* get all onboarded countries
* download rules of all countries
* check that all responses had no error
Expand All @@ -40,6 +43,7 @@ tags: negative_test

Get Rules from any country with an unauthenticated NBTLS. Should lead to an error.

* Reference "TXR-2869"
* get all onboarded countries
* create custom authentication certificate
* download rules of all countries with custom certificate
Expand Down
5 changes: 5 additions & 0 deletions specs/gateway/Rules/UpdateRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Tests to update rules

Update a Rule created to a new version.

* Reference "TXR-2863"
* create a valid Invalidation Rule
* upload Rule
* change Rule to new version
Expand All @@ -21,6 +22,7 @@ Update a Rule created to a new version.

Update a Rule created to a new version and ValidFrom value later than old rule. In the end both Versions of the rule should be downloaded.

* Reference "TXR-3032"
* create a valid Invalidation Rule
* upload Rule
* change Rule to new version
Expand All @@ -37,6 +39,7 @@ tags: negative_test

Update a Rule with a Rule lower than the current version. There should be an error.

* Reference "TXR-2864"
* create a valid Invalidation Rule
* upload Rule
* change Rule to lower version
Expand All @@ -50,6 +53,7 @@ tags: negative_test

Update a Rule without following the semantic versioning scheme (e.g. 1.3 instead of 1.3.0)

* Reference "TXR-2865"
* create a valid Invalidation Rule
* upload Rule
* change rule to version in wrong format
Expand Down Expand Up @@ -77,6 +81,7 @@ Update Rule with ValidFrom less than ValidFrom of older Version

After a rule is updated and valid the old rule should not be in the downloaded list

* Reference "TXR-2884"
* create a valid Invalidation Rule
* upload Rule
* change Rule to new version
Expand Down
4 changes: 4 additions & 0 deletions specs/gateway/Rules/UploadRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Tests to upload new rules

Upload a valid invalidation Rule. Invalidation Rule is used because it can be deleted automatically

* Reference "TXR-2860"
* create a valid <Ruletype> Rule
* upload Rule
* check that the response had no error
Expand All @@ -23,6 +24,7 @@ Upload a valid invalidation Rule. Invalidation Rule is used because it can be de

The content type header of rules normally in the test is "application/cms-text" but it can also be "application/cms" like for the certificates

* Reference "TXR-3209"
* create a valid <Ruletype> Rule
* upload Rule with cms header
* check that the response had no error
Expand All @@ -35,6 +37,7 @@ tags: negative_test

Upload a Rule with an unauthenticated certificate. There should be an error and the Response Code should be 401.

* Reference "TXR-2861"
* create a valid <Ruletype> Rule
* create custom authentication certificate
* upload Rule with custom authentication certificate
Expand All @@ -48,6 +51,7 @@ tags: negative_test

Upload a Rule with a NBTLS certificate of another country. There should be an error and the status code should be 400.

* Reference "TXR-2862"
* create a valid <Ruletype> Rule
* upload Rule with certificate from another country
* check that the response had an error
Expand Down
Loading

0 comments on commit 2334702

Please sign in to comment.