Skip to content

Commit

Permalink
Merge pull request #711 from cherrycl/issue-710
Browse files Browse the repository at this point in the history
fix: Update status code to 400 when sending device profile with invalid units
  • Loading branch information
jumpingliu authored Sep 27, 2022
2 parents 9b74ee6 + f301c59 commit a63327f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ErrProfileResourcePOST009 - Add deviceResource with invalid units value
When Create Device Resources Contain invalid Units Value
Then Should Return Status Code "207"
And Should Return Content-Type "application/json"
And Item Index All Should Contain Status Code "500"
And Item Index All Should Contain Status Code "400"
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
And Resources Should Not Be Added in ${test_profile}
[Teardown] Run Keywords Update Service Configuration On Consul ${uomValidationPath} false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ErrProfilePOSTUpload008 - Create device profile by upload file with deviceComman
ErrProfilePOSTUpload009 - Create device profile by upload file with invalid units property
Given Update Service Configuration On Consul ${uomValidationPath} true
When Modify Device Profile Test-Profile-4 With invalid Units Value
Then Should Return Status Code "500"
Then Should Return Status Code "400"
And Should Return Content-Type "application/json"
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
[Teardown] Update Service Configuration On Consul ${uomValidationPath} false
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ ErrProfilePOST009 - Create device profile with invalid units value
When Create A Profile Test-Profile-1 With invalid Units Value
Then Should Return Status Code "207"
And Should Return Content-Type "application/json"
And Item Index All Should Contain Status Code "500"
And Item Index All Should Contain Status Code "400"
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
[Teardown] Update Service Configuration On Consul ${uomValidationPath} false
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ErrProfilePUTUpload009 - Update device profile by upload file and the update fil
And Update Service Configuration On Consul ${uomValidationPath} true
And Update Units Value In Profile Test-Profile-3 To invalid
When Upload File NEW-Test-Profile-3.yaml To Update Device Profile
Then Should Return Status Code "500"
Then Should Return Status Code "400"
And Should Return Content-Type "application/json"
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
And Resource Units Should Not Be Updated in Test-Profile-3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ErrProfilePUT009 - Update device profile with invalid units value
And Set Profile Units Value To invalid
When Update Device Profile ${deviceProfile}
Then Should Return Status Code "207"
And Item Index 0 Should Contain Status Code "500"
And Item Index 0 Should Contain Status Code "400"
And Should Return Content-Type "application/json"
And Response Time Should Be Less Than "${default_response_time_threshold}"ms
And Resource Units Should Not Be Updated in Test-Profile-1
Expand Down

0 comments on commit a63327f

Please sign in to comment.