Skip to content

Commit 3401e54

Browse files
author
Aschen
committed
I hate ci dev
1 parent 5255678 commit 3401e54

File tree

36 files changed

+55
-56
lines changed

36 files changed

+55
-56
lines changed

doc/7/controllers/auth/create-api-key/snippets/create-api-key.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: auth#createApiKey
22
description: Creates a new API key for the currently loggued user.
33
hooks:
44
before: >
5-
curl -H "Content-type: application/json" -d '{
5+
curl --fail -H "Content-type: application/json" -d '{
66
"content": {
77
"profileIds": ["default"]
88
},

doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
try {
2-
await kuzzle.auth.login('local', { username: 'john.doe', password: 'password' });
2+
await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' });
33

44
await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL');
55

doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ name: auth#deleteApiKey
22
description: Deletes an API key for the currently loggued user
33
hooks:
44
before: >
5-
curl -H "Content-type: application/json" -d '{
5+
curl --fail -H "Content-type: application/json" -d '{
66
"content": {
77
"profileIds": ["default"]
88
},
99
"credentials": {
1010
"local": {
11-
"username": "john.doe",
11+
"username": "jane.doe",
1212
"password": "password"
1313
}
1414
}
15-
}' "kuzzle:7512/users/john.doe/_create?refresh=wait_for"
15+
}' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for"
1616
&&
1717
curl -XPOST -H "Content-type: application/json" -d '{
1818
"description": "Sigfox API key"
19-
}' "kuzzle:7512/users/john.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
19+
}' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
2020
after:
21-
curl -XDELETE kuzzle:7512/users/john.doe
21+
curl -XDELETE kuzzle:7512/users/jane.doe
2222
template: default
2323
expected:
2424
- API key successfully deleted

doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
try {
22
const promises = [];
33

4-
// Create some API keys for user "john.doe"
4+
// Create some API keys for user "jared.doe"
55
promises.push(
6-
kuzzle.security.createApiKey('john.doe', 'Sigfox API key'));
6+
kuzzle.security.createApiKey('jared.doe', 'Sigfox API key'));
77
promises.push(
8-
kuzzle.security.createApiKey('john.doe', 'LoRa 6 month API key', {
8+
kuzzle.security.createApiKey('jared.doe', 'LoRa 6 month API key', {
99
expiresIn: '6m'
1010
}));
1111
promises.push(
12-
kuzzle.security.createApiKey('john.doe', 'LoRa permanent API key', {
12+
kuzzle.security.createApiKey('jared.doe', 'LoRa permanent API key', {
1313
refresh: 'wait_for'
1414
}));
1515

1616
await Promise.all(promises);
1717

18-
// Log as "john.doe"
19-
await kuzzle.auth.login('local', { username: 'john.doe', password: 'password' });
18+
// Log as "jared.doe"
19+
await kuzzle.auth.login('local', { username: 'jared.doe', password: 'password' });
2020

2121
const results = await kuzzle.auth.searchApiKeys({
2222
match: {
@@ -33,7 +33,7 @@ try {
3333
"_id": "znEwbG8BJASM_0-bWU-q",
3434
"_source": {
3535
"description": "LoRa permanent API key",
36-
"userId": "john.doe",
36+
"userId": "jared.doe",
3737
"expiresAt": -1,
3838
"ttl": -1
3939
}
@@ -42,7 +42,7 @@ try {
4242
"_id": "zXEwbG8BJASM_0-bWU-q",
4343
"_source": {
4444
"description": "LoRa 1 year API key",
45-
"userId": "john.doe",
45+
"userId": "jared.doe",
4646
"expiresAt": 31557600000,
4747
"ttl": 360000
4848
}

doc/7/controllers/auth/search-api-keys/snippets/search-api-keys.test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ name: auth#searchApiKeys
22
description: Searches API keys for the currently loggued user.
33
hooks:
44
before: >
5-
curl -H "Content-type: application/json" -d '{
5+
curl --fail -H "Content-type: application/json" -d '{
66
"content": {
77
"profileIds": ["default"]
88
},
99
"credentials": {
1010
"local": {
11-
"username": "john.doe",
11+
"username": "jared.doe",
1212
"password": "password"
1313
}
1414
}
15-
}' "kuzzle:7512/users/john.doe/_create?refresh=wait_for"
16-
sleep 2
15+
}' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for"
1716
after:
18-
curl -XDELETE kuzzle:7512/users/john.doe
17+
curl -XDELETE kuzzle:7512/users/jared.doe
1918
template: default
2019
expected:
2120
- Found 2 API keys matching "LoRa"

doc/7/controllers/bulk/delete-by-query/snippets/delete-by-query.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ hooks:
77
curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi
88
99
for i in 1 2 3 4 5; do
10-
curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
10+
curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1111
done
1212
1313
for i in 1 2 3 4 5; do
14-
curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
14+
curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1515
done
1616
1717
curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh

doc/7/controllers/document/count/snippets/count.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ hooks:
77
curl -XPOST kuzzle:7512/nyc-open-data/_create
88
curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi
99
for i in 1 2 3 4 5; do
10-
curl -H "Content-type: application/json" -d '{"license": "valid"}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
10+
curl --fail -H "Content-type: application/json" -d '{"license": "valid"}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1111
done
1212
for i in 1 2 3 4 5; do
13-
curl -H "Content-type: application/json" -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
13+
curl --fail -H "Content-type: application/json" -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1414
done
1515
curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh
1616
after:

doc/7/controllers/document/delete-by-query/snippets/delete-by-query.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ hooks:
77
curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi
88
99
for i in 1 2 3 4 5; do
10-
curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
10+
curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1111
done
1212
1313
for i in 1 2 3 4 5; do
14-
curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
14+
curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1515
done
1616
1717
curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh

doc/7/controllers/document/delete/snippets/delete.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ hooks:
55
curl -XDELETE kuzzle:7512/nyc-open-data
66
curl -XPOST kuzzle:7512/nyc-open-data/_create
77
curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi
8-
curl -H "Content-type: application/json" -XPUT -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/some-id
8+
curl --fail -H "Content-type: application/json" -XPUT -d '{}' kuzzle:7512/nyc-open-data/yellow-taxi/some-id
99
after:
1010
template: default
1111
expected: Success

doc/7/controllers/document/update-by-query/snippets/update-by-query.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ hooks:
66
curl -XPOST kuzzle:7512/nyc-open-data/_create
77
curl -XPUT kuzzle:7512/nyc-open-data/yellow-taxi
88
for i in 1 2 ; do
9-
curl -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/document_$i/_create
9+
curl --fail -H "Content-type: application/json" -d '{"capacity": 4}' kuzzle:7512/nyc-open-data/yellow-taxi/document_$i/_create
1010
done
1111
for i in 1 2 3 4 5; do
12-
curl -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
12+
curl --fail -H "Content-type: application/json" -d '{"capacity": 7}' kuzzle:7512/nyc-open-data/yellow-taxi/_create
1313
done
1414
curl -XPOST kuzzle:7512/nyc-open-data/yellow-taxi/_refresh
1515
after:

0 commit comments

Comments
 (0)