Skip to content

Commit

Permalink
Update LocationRetrieval.feature
Browse files Browse the repository at this point in the history
Update following camaraproject/Commonalities#117 proposal.
  • Loading branch information
bigludo7 authored Jan 12, 2024
1 parent 9c05433 commit 2efcf50
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions code/Test_definitions/LocationRetrieval.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Get a device location (POST /retrieve)

@Test_Retrieve_location_not_by_ipv4Address
@location_retrieval_01_by_phoneNumber_or_ipv4Address_or_networkAccessIdentifier
Scenario: Get the location of a device
Given a valid device <device> identified by a <deviceIdentierName> <deviceIdentierValue>
And a provided maxAge of 80 seconds
Expand All @@ -15,7 +15,7 @@ Feature: Get a device location (POST /retrieve)
| ipv6Address | 2001:db8:85a3:8d3:1319:8a2e:370:7344 |


@Test_Retrieve_location_by_ipv4Address
@location_retrieval_02_by_ipv4Address
Scenario: Get the location of a device
Given a valid device <device> identified by a <publicAddress> <privateAddress> <port>
And a provided maxAge of 80 seconds
Expand All @@ -29,46 +29,46 @@ Feature: Get a device location (POST /retrieve)
| 84.125.93.10 | 84.125.93.10 | null |


@Test_Retrieve_location_Invalid_MaxAge
@location_retrieval_03_Invalid_MaxAge
Scenario: Input an invalid maxAge value (less than 60)
Given a valid device identified with phoneNumber +34666111333
When a retrieve request is made with a valid maxAge parameter of 59
Then the response status code should be 400
And the response body should contain an error message indicating an invalid argument


@Test_Retrieve_location_Missing_MaxAge
@location_retrieval_04_Missing_MaxAge
Scenario: Input did not feature a maxAge
Given a valid device identified with phoneNumber +34666111333
When a retrieve request is made without a maxAge parameter
Then the response status code should be 400
And the response body should contain an error message indicating an invalid argument


@Test_Missing_Device_Identifier
@location_retrieval_05_Missing_Device_Identifier
Scenario: Perform a request without a device identifier
When a Check SimSwap request is made without a deviceIdentifier
Then the response status code should be 400
And the response should contain an error message indicating a missing field


@Test_Unknown_Device_Identifier
@location_retrieval_06_Unknown_Device_Identifier
Scenario: Input an unknown device identifier
Given a device identified by +33999999999
When a retrieve request is made
Then the response status code should be 404
And the response should contain an error message indicating that the specified resource is not found


@Test_Unauthorized_Request
@location_retrieval_07_Unauthorized_Request
Scenario: Perform an unauthorized request
Given that the requester is unauthorized
When a retrieve request is made
Then the response status code should be 401
And the response should contain an error message indicating unauthorized access


@Test_Inconsistency_Access_Token_Payload
@location_retrieval_08_Inconsistency_Access_Token_Payload
Scenario: Perform an request
Given the phoneNumber +33666111333 is retrieved from the authentification step
And the phoneNumber <bodyPhoneNumber> is provided in the body
Expand All @@ -80,4 +80,4 @@ Feature: Get a device location (POST /retrieve)
| bodyPhoneNumber| code |
| null | 200 |
| +33666111333 | 200 |
| +33666111339 | 401 |
| +33666111339 | 401 |

0 comments on commit 2efcf50

Please sign in to comment.