diff --git a/doc/7/controllers/auth/create-api-key/snippets/create-api-key.test.yml b/doc/7/controllers/auth/create-api-key/snippets/create-api-key.test.yml index 40db9afa6..96029d0b1 100644 --- a/doc/7/controllers/auth/create-api-key/snippets/create-api-key.test.yml +++ b/doc/7/controllers/auth/create-api-key/snippets/create-api-key.test.yml @@ -2,7 +2,7 @@ name: auth#createApiKey description: Creates a new API key for the currently loggued user. hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js b/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js index e6f1feb2b..7a91a2109 100644 --- a/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js +++ b/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js @@ -1,5 +1,5 @@ try { - await kuzzle.auth.login('local', { username: 'john.doe', password: 'password' }); + await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' }); await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL'); diff --git a/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml b/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml index 7dbd119ef..96797828a 100644 --- a/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml +++ b/doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml @@ -2,23 +2,23 @@ name: auth#deleteApiKey description: Deletes an API key for the currently loggued user hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, "credentials": { "local": { - "username": "john.doe", + "username": "jane.doe", "password": "password" } } - }' "kuzzle:7512/users/john.doe/_create?refresh=wait_for" + }' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for" && curl -XPOST -H "Content-type: application/json" -d '{ "description": "Sigfox API key" - }' "kuzzle:7512/users/john.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for" + }' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for" after: - curl -XDELETE kuzzle:7512/users/john.doe + curl -XDELETE kuzzle:7512/users/jane.doe template: default expected: - API key successfully deleted diff --git a/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.js b/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.js index a8b0981c3..f558bf8d0 100644 --- a/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.js +++ b/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.js @@ -1,22 +1,22 @@ try { const promises = []; - // Create some API keys for user "john.doe" + // Create some API keys for user "jared.doe" promises.push( - kuzzle.security.createApiKey('john.doe', 'Sigfox API key')); + kuzzle.security.createApiKey('jared.doe', 'Sigfox API key')); promises.push( - kuzzle.security.createApiKey('john.doe', 'LoRa 6 month API key', { + kuzzle.security.createApiKey('jared.doe', 'LoRa 6 month API key', { expiresIn: '6m' })); promises.push( - kuzzle.security.createApiKey('john.doe', 'LoRa permanent API key', { + kuzzle.security.createApiKey('jared.doe', 'LoRa permanent API key', { refresh: 'wait_for' })); await Promise.all(promises); - // Log as "john.doe" - await kuzzle.auth.login('local', { username: 'john.doe', password: 'password' }); + // Log as "jared.doe" + await kuzzle.auth.login('local', { username: 'jared.doe', password: 'password' }); const results = await kuzzle.auth.searchApiKeys({ match: { @@ -33,7 +33,7 @@ try { "_id": "znEwbG8BJASM_0-bWU-q", "_source": { "description": "LoRa permanent API key", - "userId": "john.doe", + "userId": "jared.doe", "expiresAt": -1, "ttl": -1 } @@ -42,7 +42,7 @@ try { "_id": "zXEwbG8BJASM_0-bWU-q", "_source": { "description": "LoRa 1 year API key", - "userId": "john.doe", + "userId": "jared.doe", "expiresAt": 31557600000, "ttl": 360000 } diff --git a/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.test.yml b/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.test.yml index 845f9da3a..49723656e 100644 --- a/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.test.yml +++ b/doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.test.yml @@ -2,20 +2,19 @@ name: auth#searchApiKeys description: Searches API keys for the currently loggued user. hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, "credentials": { "local": { - "username": "john.doe", + "username": "jared.doe", "password": "password" } } - }' "kuzzle:7512/users/john.doe/_create?refresh=wait_for" - sleep 2 + }' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for" after: - curl -XDELETE kuzzle:7512/users/john.doe + curl -XDELETE kuzzle:7512/users/jared.doe template: default expected: - Found 2 API keys matching "LoRa" diff --git a/doc/7/controllers/bulk/delete-by-query/snippets/delete-by-query.test.yml b/doc/7/controllers/bulk/delete-by-query/snippets/delete-by-query.test.yml index f1a308132..429878101 100644 --- a/doc/7/controllers/bulk/delete-by-query/snippets/delete-by-query.test.yml +++ b/doc/7/controllers/bulk/delete-by-query/snippets/delete-by-query.test.yml @@ -7,11 +7,11 @@ hooks: curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh diff --git a/doc/7/controllers/document/count/snippets/count.test.yml b/doc/7/controllers/document/count/snippets/count.test.yml index bd19e71b0..c9ad44fae 100644 --- a/doc/7/controllers/document/count/snippets/count.test.yml +++ b/doc/7/controllers/document/count/snippets/count.test.yml @@ -7,10 +7,10 @@ hooks: curl -XPOST kuzzle:7512/nyc-open-data/_create curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"license": "valid"}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"license": "valid"}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh after: diff --git a/doc/7/controllers/document/delete-by-query/snippets/delete-by-query.test.yml b/doc/7/controllers/document/delete-by-query/snippets/delete-by-query.test.yml index a95123d23..a59359403 100644 --- a/doc/7/controllers/document/delete-by-query/snippets/delete-by-query.test.yml +++ b/doc/7/controllers/document/delete-by-query/snippets/delete-by-query.test.yml @@ -7,11 +7,11 @@ hooks: curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh diff --git a/doc/7/controllers/document/delete/snippets/delete.test.yml b/doc/7/controllers/document/delete/snippets/delete.test.yml index e25145e3d..0ce344bb0 100644 --- a/doc/7/controllers/document/delete/snippets/delete.test.yml +++ b/doc/7/controllers/document/delete/snippets/delete.test.yml @@ -5,7 +5,7 @@ hooks: curl -XDELETE kuzzle:7512/nyc-open-data curl -XPOST kuzzle:7512/nyc-open-data/_create curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi - curl -H "Content-type: application/json" -XPUT -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/some-id + curl --fail -H "Content-type: application/json" -XPUT -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/some-id after: template: default expected: Success diff --git a/doc/7/controllers/document/update-by-query/snippets/update-by-query.test.yml b/doc/7/controllers/document/update-by-query/snippets/update-by-query.test.yml index a51c40859..7cd7f4704 100644 --- a/doc/7/controllers/document/update-by-query/snippets/update-by-query.test.yml +++ b/doc/7/controllers/document/update-by-query/snippets/update-by-query.test.yml @@ -6,10 +6,10 @@ hooks: curl -XPOST kuzzle:7512/nyc-open-data/_create curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi for i in 1 2 ; do - curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/document_$i/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/document_$i/_create done for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create + curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create done curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh after: diff --git a/doc/7/controllers/security/create-api-key/snippets/create-api-key.test.yml b/doc/7/controllers/security/create-api-key/snippets/create-api-key.test.yml index 66485aad9..842b41a39 100644 --- a/doc/7/controllers/security/create-api-key/snippets/create-api-key.test.yml +++ b/doc/7/controllers/security/create-api-key/snippets/create-api-key.test.yml @@ -2,7 +2,7 @@ name: security#createApiKey description: Creates a new API key for an user hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] } diff --git a/doc/7/controllers/security/delete-api-key/snippets/delete-api-key.test.yml b/doc/7/controllers/security/delete-api-key/snippets/delete-api-key.test.yml index 0ee031be4..a9ae4bb54 100644 --- a/doc/7/controllers/security/delete-api-key/snippets/delete-api-key.test.yml +++ b/doc/7/controllers/security/delete-api-key/snippets/delete-api-key.test.yml @@ -2,7 +2,7 @@ name: security#deleteApiKey description: Deletes an user API key hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] } diff --git a/doc/7/controllers/security/delete-credentials/snippets/delete-credentials.test.yml b/doc/7/controllers/security/delete-credentials/snippets/delete-credentials.test.yml index 30e106e2a..18b3bbb36 100644 --- a/doc/7/controllers/security/delete-credentials/snippets/delete-credentials.test.yml +++ b/doc/7/controllers/security/delete-credentials/snippets/delete-credentials.test.yml @@ -2,7 +2,7 @@ name: security#deleteCredentials description: deletes credentials hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/security/delete-profile/snippets/delete-profile.test.yml b/doc/7/controllers/security/delete-profile/snippets/delete-profile.test.yml index ef4b73bb4..2d8b92d8e 100644 --- a/doc/7/controllers/security/delete-profile/snippets/delete-profile.test.yml +++ b/doc/7/controllers/security/delete-profile/snippets/delete-profile.test.yml @@ -2,7 +2,7 @@ name: security#deleteProfile description: deletes profile hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [] }' kuzzle:7512/profiles/myProfile/_create template: default diff --git a/doc/7/controllers/security/delete-role/snippets/delete-role.test.yml b/doc/7/controllers/security/delete-role/snippets/delete-role.test.yml index 47f9e3eb1..b2f06efa2 100644 --- a/doc/7/controllers/security/delete-role/snippets/delete-role.test.yml +++ b/doc/7/controllers/security/delete-role/snippets/delete-role.test.yml @@ -2,7 +2,7 @@ name: security#deleteRole description: deletes role hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "controllers": { "*": { "actions": { diff --git a/doc/7/controllers/security/delete-user/snippets/delete-user.test.yml b/doc/7/controllers/security/delete-user/snippets/delete-user.test.yml index f82599c33..764b04c97 100644 --- a/doc/7/controllers/security/delete-user/snippets/delete-user.test.yml +++ b/doc/7/controllers/security/delete-user/snippets/delete-user.test.yml @@ -2,7 +2,7 @@ name: security#deleteUser description: Deletes a user hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/security/get-credentials-by-id/snippets/get-credentials-by-id.test.yml b/doc/7/controllers/security/get-credentials-by-id/snippets/get-credentials-by-id.test.yml index 073dd18d7..deec2898e 100644 --- a/doc/7/controllers/security/get-credentials-by-id/snippets/get-credentials-by-id.test.yml +++ b/doc/7/controllers/security/get-credentials-by-id/snippets/get-credentials-by-id.test.yml @@ -2,7 +2,7 @@ name: security#getCredentialsById description: get credentials by id hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/security/get-credentials/snippets/get-credentials.test.yml b/doc/7/controllers/security/get-credentials/snippets/get-credentials.test.yml index d2bb2f8e1..9da59450a 100644 --- a/doc/7/controllers/security/get-credentials/snippets/get-credentials.test.yml +++ b/doc/7/controllers/security/get-credentials/snippets/get-credentials.test.yml @@ -2,7 +2,7 @@ name: security#getCredentials description: get credentials hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/security/get-profile-rights/snippets/get-profile-rights.test.yml b/doc/7/controllers/security/get-profile-rights/snippets/get-profile-rights.test.yml index 5c7431987..7d0a9cf52 100644 --- a/doc/7/controllers/security/get-profile-rights/snippets/get-profile-rights.test.yml +++ b/doc/7/controllers/security/get-profile-rights/snippets/get-profile-rights.test.yml @@ -2,7 +2,7 @@ name: security#getProfileRights description: get profile rights hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [ { "roleId": "admin", diff --git a/doc/7/controllers/security/get-profile/snippets/get-profile.test.yml b/doc/7/controllers/security/get-profile/snippets/get-profile.test.yml index 5374523e0..210f1ee28 100644 --- a/doc/7/controllers/security/get-profile/snippets/get-profile.test.yml +++ b/doc/7/controllers/security/get-profile/snippets/get-profile.test.yml @@ -2,7 +2,7 @@ name: security#getProfile description: get profile hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [ { "roleId": "admin", diff --git a/doc/7/controllers/security/get-role/snippets/get-role.test.yml b/doc/7/controllers/security/get-role/snippets/get-role.test.yml index e17e33b90..eafcd8c95 100644 --- a/doc/7/controllers/security/get-role/snippets/get-role.test.yml +++ b/doc/7/controllers/security/get-role/snippets/get-role.test.yml @@ -2,7 +2,7 @@ name: security#getRole description: get role hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "controllers": { "auth": { "actions": { diff --git a/doc/7/controllers/security/get-user-rights/snippets/get-user-rights.test.yml b/doc/7/controllers/security/get-user-rights/snippets/get-user-rights.test.yml index e0a7de1ec..cda1b8881 100644 --- a/doc/7/controllers/security/get-user-rights/snippets/get-user-rights.test.yml +++ b/doc/7/controllers/security/get-user-rights/snippets/get-user-rights.test.yml @@ -2,7 +2,7 @@ name: security#getUserRights description: get user rights hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ], "fullName": "John Doe" diff --git a/doc/7/controllers/security/get-user/snippets/get-user.test.yml b/doc/7/controllers/security/get-user/snippets/get-user.test.yml index 3857b743f..5171a107e 100644 --- a/doc/7/controllers/security/get-user/snippets/get-user.test.yml +++ b/doc/7/controllers/security/get-user/snippets/get-user.test.yml @@ -2,7 +2,7 @@ name: security#getUser description: get user hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ], "fullName": "John Doe" diff --git a/doc/7/controllers/security/has-credentials/snippets/has-credentials.test.yml b/doc/7/controllers/security/has-credentials/snippets/has-credentials.test.yml index 81f335cd7..8fee898e5 100644 --- a/doc/7/controllers/security/has-credentials/snippets/has-credentials.test.yml +++ b/doc/7/controllers/security/has-credentials/snippets/has-credentials.test.yml @@ -2,7 +2,7 @@ name: security#hasCredentials description: has credentials hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ], "fullName": "John Doe" diff --git a/doc/7/controllers/security/m-delete-profiles/snippets/m-delete-profiles.test.yml b/doc/7/controllers/security/m-delete-profiles/snippets/m-delete-profiles.test.yml index 0c7f7e2de..e5aa30556 100644 --- a/doc/7/controllers/security/m-delete-profiles/snippets/m-delete-profiles.test.yml +++ b/doc/7/controllers/security/m-delete-profiles/snippets/m-delete-profiles.test.yml @@ -3,7 +3,7 @@ description: mdelete profiles hooks: before: | for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [{ "roleId": "default" }] }' kuzzle:7512/profiles/profile${i}/_create done diff --git a/doc/7/controllers/security/m-delete-roles/snippets/m-delete-roles.test.yml b/doc/7/controllers/security/m-delete-roles/snippets/m-delete-roles.test.yml index 1fb4967fa..e1584334b 100644 --- a/doc/7/controllers/security/m-delete-roles/snippets/m-delete-roles.test.yml +++ b/doc/7/controllers/security/m-delete-roles/snippets/m-delete-roles.test.yml @@ -3,7 +3,7 @@ description: mdelete roles hooks: before: | for i in 1 2 3 4 5; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "controllers": { "*": { "actions": { diff --git a/doc/7/controllers/security/m-delete-users/snippets/m-delete-users.test.yml b/doc/7/controllers/security/m-delete-users/snippets/m-delete-users.test.yml index ef0acb81b..2563308aa 100644 --- a/doc/7/controllers/security/m-delete-users/snippets/m-delete-users.test.yml +++ b/doc/7/controllers/security/m-delete-users/snippets/m-delete-users.test.yml @@ -3,7 +3,7 @@ description: mdelete users hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ] }, diff --git a/doc/7/controllers/security/m-get-profiles/snippets/m-get-profiles.test.yml b/doc/7/controllers/security/m-get-profiles/snippets/m-get-profiles.test.yml index 35652db1e..df683ef23 100644 --- a/doc/7/controllers/security/m-get-profiles/snippets/m-get-profiles.test.yml +++ b/doc/7/controllers/security/m-get-profiles/snippets/m-get-profiles.test.yml @@ -3,7 +3,7 @@ description: mget profiles hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [{"roleId": "default"}] }' kuzzle:7512/profiles/profile${i}/_create done diff --git a/doc/7/controllers/security/m-get-roles/snippets/m-get-roles.test.yml b/doc/7/controllers/security/m-get-roles/snippets/m-get-roles.test.yml index 6f2dc043b..b1b4cfe89 100644 --- a/doc/7/controllers/security/m-get-roles/snippets/m-get-roles.test.yml +++ b/doc/7/controllers/security/m-get-roles/snippets/m-get-roles.test.yml @@ -3,7 +3,7 @@ description: mget roles hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "controllers": { "*": { "actions": { diff --git a/doc/7/controllers/security/m-get-users/snippets/m-get-users.test.yml b/doc/7/controllers/security/m-get-users/snippets/m-get-users.test.yml index 58bcc9ee9..11bb312df 100644 --- a/doc/7/controllers/security/m-get-users/snippets/m-get-users.test.yml +++ b/doc/7/controllers/security/m-get-users/snippets/m-get-users.test.yml @@ -3,7 +3,7 @@ description: mget users hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"], "fullname": "user'${i}'" diff --git a/doc/7/controllers/security/replace-user/snippets/replace-user.test.yml b/doc/7/controllers/security/replace-user/snippets/replace-user.test.yml index 4a1c8e239..07a6c744a 100644 --- a/doc/7/controllers/security/replace-user/snippets/replace-user.test.yml +++ b/doc/7/controllers/security/replace-user/snippets/replace-user.test.yml @@ -2,7 +2,7 @@ name: security#replaceUser description: replace user hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ] }, diff --git a/doc/7/controllers/security/search-api-keys/snippets/search-api-keys.test.yml b/doc/7/controllers/security/search-api-keys/snippets/search-api-keys.test.yml index 91f234349..b6029ecbc 100644 --- a/doc/7/controllers/security/search-api-keys/snippets/search-api-keys.test.yml +++ b/doc/7/controllers/security/search-api-keys/snippets/search-api-keys.test.yml @@ -2,7 +2,7 @@ name: security#searchApiKeys description: Searches for an user API keys hooks: before: > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": ["default"] } diff --git a/doc/7/controllers/security/search-profiles/snippets/search-profiles.test.yml b/doc/7/controllers/security/search-profiles/snippets/search-profiles.test.yml index 8447e0ffd..317755d03 100644 --- a/doc/7/controllers/security/search-profiles/snippets/search-profiles.test.yml +++ b/doc/7/controllers/security/search-profiles/snippets/search-profiles.test.yml @@ -3,7 +3,7 @@ description: search profiles hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [{ "roleId": "default" }] }' kuzzle:7512/profiles/profile${i}/_create?refresh=wait_for done diff --git a/doc/7/controllers/security/search-users/snippets/search-users.test.yml b/doc/7/controllers/security/search-users/snippets/search-users.test.yml index 31a0b16e3..0fadb2e8d 100644 --- a/doc/7/controllers/security/search-users/snippets/search-users.test.yml +++ b/doc/7/controllers/security/search-users/snippets/search-users.test.yml @@ -3,7 +3,7 @@ description: search users hooks: before: | for i in 1 2 3; do - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "content": { "profileIds": [ "default" ], "status": "student" diff --git a/doc/7/controllers/security/update-credentials/snippets/update-credentials.test.yml b/doc/7/controllers/security/update-credentials/snippets/update-credentials.test.yml index b089d1136..42df29f6d 100644 --- a/doc/7/controllers/security/update-credentials/snippets/update-credentials.test.yml +++ b/doc/7/controllers/security/update-credentials/snippets/update-credentials.test.yml @@ -2,7 +2,7 @@ name: security#updateCredentials description: update credentials hooks: before: > - curl -H "Content-type: application/json" -f -d '{ + curl --fail -H "Content-type: application/json" -f -d '{ "content": { "profileIds": ["default"] }, diff --git a/doc/7/controllers/security/update-profile/snippets/update-profile.test.yml b/doc/7/controllers/security/update-profile/snippets/update-profile.test.yml index 945d3707e..afd0e8ec1 100644 --- a/doc/7/controllers/security/update-profile/snippets/update-profile.test.yml +++ b/doc/7/controllers/security/update-profile/snippets/update-profile.test.yml @@ -3,11 +3,11 @@ description: updates a security profile definition hooks: before: - > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "policies": [] }' kuzzle:7512/profiles/myProfile/_create - > - curl -H "Content-type: application/json" -d '{ + curl --fail -H "Content-type: application/json" -d '{ "controllers": { "*": { "actions": {