File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ load 'utils/_helpers'
5757 resource_post " $_RUNTIME_ACL_BASE_PATH /$PARENT_NAME /entries" " data/post.json"
5858 assert_equal " $SC " 201
5959 assert_equal " $( get_json_path " ${BODY} " " .value" ) " " /js"
60+
61+ # Adding the same entry twice should return a 409 error.
62+ resource_post " $_RUNTIME_ACL_BASE_PATH /$PARENT_NAME /entries" " data/post.json"
63+ assert_equal " $SC " 409
6064}
6165
6266@test " acl_runtime: Delete an ACL file entry by its ID" {
Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ func HandleError(err error) *models.Error {
102102 code := ErrHTTPInternalServerError
103103 if errors .Is (t , client_errors .ErrNotFound ) {
104104 code = ErrHTTPNotFound
105+ } else if errors .Is (t , client_errors .ErrAlreadyExists ) {
106+ code = ErrHTTPConflict
105107 }
106108 return & models.Error {Code : & code , Message : & msg }
107109 }
You can’t perform that action at this time.
0 commit comments