Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement tests for new migrations
- Loading branch information
Showing
33 changed files
with
376 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
persistence/sql/migratest/fixtures/login_flow/b1fac7fb-d016-4a06-a7fe-e4eab2a0429f.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"id": "b1fac7fb-d016-4a06-a7fe-e4eab2a0429f", | ||
"type": "api", | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"request_url": "http://kratos:4433/self-service/browser/flows/login", | ||
"messages": [], | ||
"methods": { | ||
"password": { | ||
"method": "password", | ||
"config": { | ||
"action": "http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/login/strategies/password?request=3a9ea34f-0f12-469b-9417-3ae5795a7baa", | ||
"method": "POST", | ||
"fields": [ | ||
{ | ||
"name": "identifier", | ||
"type": "text", | ||
"required": true, | ||
"value": "" | ||
}, | ||
{ | ||
"name": "password", | ||
"type": "password", | ||
"required": true | ||
}, | ||
{ | ||
"name": "csrf_token", | ||
"type": "hidden", | ||
"required": true, | ||
"value": "fpeVSZ9ZH7YvUkhXsOVEIssxbfauh5lcoQSYxTcN0XkMneg1L42h+HtvisjlNjBF4ElcD2jApCHoJYq2u9sVWg==" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"forced": false | ||
} |
32 changes: 32 additions & 0 deletions
32
persistence/sql/migratest/fixtures/recovery_flow/0d14427f-e16d-43a5-8695-8278bf85d4eb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"id": "0d14427f-e16d-43a5-8695-8278bf85d4eb", | ||
"type": "api", | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"request_url": "http://kratos:4433/self-service/browser/flows/registration", | ||
"active": "link", | ||
"messages": [], | ||
"methods": { | ||
"link": { | ||
"method": "link", | ||
"config": { | ||
"action": "http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/settings/strategies/profile?request=21c5f714-3089-49d2-b387-f244d4dd9e00", | ||
"method": "POST", | ||
"fields": [ | ||
{ | ||
"name": "csrf_token", | ||
"type": "hidden", | ||
"required": true, | ||
"value": "yDwSg0quCmc4kBl7lBqYwGh4W8awrc+TpeWiigZs3iemRCwqeDhGdrW3sIv8T7u742pN+Kryx/NrdRpEXcT9qA==" | ||
}, | ||
{ | ||
"name": "traits.email", | ||
"type": "text", | ||
"value": "foo" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"state": "choose_method" | ||
} |
36 changes: 36 additions & 0 deletions
36
...stence/sql/migratest/fixtures/registration_flow/8ef215a9-e8d5-43b3-9aa3-cb4333562e36.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"id": "8ef215a9-e8d5-43b3-9aa3-cb4333562e36", | ||
"type": "api", | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"request_url": "http://kratos:4433/self-service/browser/flows/registration", | ||
"active": "password", | ||
"messages": [], | ||
"methods": { | ||
"password": { | ||
"method": "password", | ||
"config": { | ||
"action": "http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/registration/strategies/password?request=87fa3f43-5155-42b4-a1ad-174c2595fdaf", | ||
"method": "POST", | ||
"fields": [ | ||
{ | ||
"name": "csrf_token", | ||
"type": "hidden", | ||
"required": true, | ||
"value": "KeEp3OT+pHSXJpZAP+C1hR3yr4eIjUBDhg9tc/F1WI1b61SgVCoaOsMbVN9qM8HiNoqefk7KfT7PLn8AfaOcrg==" | ||
}, | ||
{ | ||
"name": "password", | ||
"type": "password", | ||
"required": true | ||
}, | ||
{ | ||
"name": "traits.email", | ||
"type": "text", | ||
"value": "foo@ory.sh" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
persistence/sql/migratest/fixtures/session/8571e374-38f2-4f46-8ad3-b9d914e174d3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"id": "8571e374-38f2-4f46-8ad3-b9d914e174d3", | ||
"active": false, | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"authenticated_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"identity": { | ||
"id": "5ff66179-c240-4703-b0d8-494592cefff5", | ||
"schema_id": "default", | ||
"schema_url": "https://www.ory.sh/schemas/default", | ||
"traits": { | ||
"email": "bazbar@ory.sh" | ||
}, | ||
"verifiable_addresses": [ | ||
{ | ||
"id": "45e867e9-2745-4f16-8dd4-84334a252b61", | ||
"value": "foo@ory.sh", | ||
"verified": false, | ||
"via": "email", | ||
"verified_at": null, | ||
"expires_at": "2013-10-07T08:23:19Z" | ||
} | ||
] | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
persistence/sql/migratest/fixtures/session/f38cdebe-e567-42c9-a562-1bd4dee40998.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"id": "f38cdebe-e567-42c9-a562-1bd4dee40998", | ||
"active": true, | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"authenticated_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"identity": { | ||
"id": "5ff66179-c240-4703-b0d8-494592cefff5", | ||
"schema_id": "default", | ||
"schema_url": "https://www.ory.sh/schemas/default", | ||
"traits": { | ||
"email": "bazbar@ory.sh" | ||
}, | ||
"verifiable_addresses": [ | ||
{ | ||
"id": "45e867e9-2745-4f16-8dd4-84334a252b61", | ||
"value": "foo@ory.sh", | ||
"verified": false, | ||
"via": "email", | ||
"verified_at": null, | ||
"expires_at": "2013-10-07T08:23:19Z" | ||
} | ||
] | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
persistence/sql/migratest/fixtures/settings_flow/90b4f970-b9ae-42bc-a0a7-73ec750e0aa1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"id": "90b4f970-b9ae-42bc-a0a7-73ec750e0aa1", | ||
"type": "browser", | ||
"expires_at": "2013-10-07T08:23:19Z", | ||
"issued_at": "2013-10-07T08:23:19Z", | ||
"request_url": "http://kratos:4433/self-service/browser/flows/settings", | ||
"active": "profile", | ||
"messages": [], | ||
"methods": { | ||
"profile": { | ||
"method": "profile", | ||
"config": { | ||
"action": "http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/settings/strategies/profile?request=21c5f714-3089-49d2-b387-f244d4dd9e00", | ||
"method": "POST", | ||
"fields": [ | ||
{ | ||
"name": "csrf_token", | ||
"type": "hidden", | ||
"required": true, | ||
"value": "yDwSg0quCmc4kBl7lBqYwGh4W8awrc+TpeWiigZs3iemRCwqeDhGdrW3sIv8T7u742pN+Kryx/NrdRpEXcT9qA==" | ||
}, | ||
{ | ||
"name": "traits.email", | ||
"type": "text", | ||
"value": "foo" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"identity": { | ||
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e", | ||
"schema_id": "default", | ||
"schema_url": "", | ||
"traits": { | ||
"email": "foobar@ory.sh" | ||
} | ||
}, | ||
"state": "show_form" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
INSERT INTO selfservice_login_flows (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, forced, messages, type) | ||
VALUES ('b1fac7fb-d016-4a06-a7fe-e4eab2a0429f', 'http://kratos:4433/self-service/browser/flows/login', '2013-10-07 08:23:19', '2013-10-07 08:23:19', '', 'fpeVSZ9ZH7YvUkhXsOVEIssxbfauh5lcoQSYxTcN0XkMneg1L42h+HtvisjlNjBF4ElcD2jApCHoJYq2u9sVWg==', '2013-10-07 08:23:19', '2013-10-07 08:23:19', false, '[]', 'api'); | ||
INSERT INTO selfservice_login_flow_methods (id, method, selfservice_login_request_id, config, created_at, updated_at) | ||
VALUES ('8ca78d66-772a-4408-804e-f5d3d9fe696e', 'password', 'b1fac7fb-d016-4a06-a7fe-e4eab2a0429f', '{"action":"http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/login/strategies/password?request=3a9ea34f-0f12-469b-9417-3ae5795a7baa","method":"POST","fields":[{"name":"identifier","type":"text","required":true,"value":""},{"name":"password","type":"password","required":true},{"name":"csrf_token","type":"hidden","required":true,"value":"fpeVSZ9ZH7YvUkhXsOVEIssxbfauh5lcoQSYxTcN0XkMneg1L42h+HtvisjlNjBF4ElcD2jApCHoJYq2u9sVWg=="}]}', '2013-10-07 08:23:19', '2013-10-07 08:23:19'); | ||
|
||
INSERT INTO selfservice_registration_flows (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, messages, type) | ||
VALUES ('8ef215a9-e8d5-43b3-9aa3-cb4333562e36', 'http://kratos:4433/self-service/browser/flows/registration', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'password', 'vYYuhWXBfXKzBC+BlnbDmXfBKsUWY6SU/v04gHF9GYzPjFP51RXDPOc57R7Dpbf+XLkbPNAkmem33Crz/avdrw==', '2013-10-07 08:23:19', '2013-10-07 08:23:19', '[]', 'api'); | ||
INSERT INTO selfservice_registration_flow_methods (id, method, selfservice_registration_request_id, config, created_at, updated_at) | ||
VALUES ('356019d1-900e-4c6d-b3f1-564c86930979', 'password', '8ef215a9-e8d5-43b3-9aa3-cb4333562e36', '{"action":"http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/registration/strategies/password?request=87fa3f43-5155-42b4-a1ad-174c2595fdaf","method":"POST","fields":[{"name":"csrf_token","type":"hidden","required":true,"value":"KeEp3OT+pHSXJpZAP+C1hR3yr4eIjUBDhg9tc/F1WI1b61SgVCoaOsMbVN9qM8HiNoqefk7KfT7PLn8AfaOcrg=="},{"name":"password","type":"password","required":true,"errors":[{"message":"the password does not fulfill the password policy because: the password has been found in at least 23547453 data breaches and must no longer be used."}]},{"name":"traits.email","type":"text","value":"foo@ory.sh"}]}', '2013-10-07 08:23:19', '2013-10-07 08:23:19'); | ||
|
||
INSERT INTO selfservice_settings_flows (id, request_url, issued_at, expires_at, state, identity_id, created_at, updated_at, active_method, messages) | ||
VALUES ('90b4f970-b9ae-42bc-a0a7-73ec750e0aa1', 'http://kratos:4433/self-service/browser/flows/settings', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'show_form', 'a251ebc2-880c-4f76-a8f3-38e6940eab0e', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'profile', '[]'); | ||
INSERT INTO selfservice_settings_flow_methods (id, method, selfservice_settings_request_id, config, created_at, updated_at) | ||
VALUES ('547e8444-b3b0-4de7-9fdf-b80d6a8de15f', 'profile', '90b4f970-b9ae-42bc-a0a7-73ec750e0aa1', '{"action":"http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/settings/strategies/profile?request=21c5f714-3089-49d2-b387-f244d4dd9e00","method":"POST","fields":[{"name":"csrf_token","type":"hidden","required":true,"value":"yDwSg0quCmc4kBl7lBqYwGh4W8awrc+TpeWiigZs3iemRCwqeDhGdrW3sIv8T7u742pN+Kryx/NrdRpEXcT9qA=="},{"name":"traits.email","type":"text","value":"foo","errors":[{"message":"validation failed"},{"message":"foo is not valid email"},{"message":"foo is not valid email"}]}]}', '2013-10-07 08:23:19', '2013-10-07 08:23:19'); | ||
|
||
INSERT INTO selfservice_verification_flows (id, request_url, issued_at, expires_at, form, via, csrf_token, success, created_at, updated_at, messages, type) | ||
VALUES ('42f31e47-65e1-4be9-80ea-e5d8ed64b236', 'http://kratos:4433/self-service/browser/flows/verification/email', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'null', 'email', '8xoIMa1+UkDqTt+tIHmIEHztQkk0AWk2PJhWWYDmB6dSE+RtJinnxtwH5lNNCnYyQuCF2ugy7rWjCgiwYPJNOw==', true, '2013-10-07 08:23:19', '2013-10-07 08:23:19', '[]', 'api'); | ||
|
||
INSERT INTO selfservice_recovery_flows (id, request_url, issued_at, expires_at, messages, active_method, csrf_token, state, recovered_identity_id, created_at, updated_at, type) | ||
VALUES ('0d14427f-e16d-43a5-8695-8278bf85d4eb', 'http://kratos:4433/self-service/browser/flows/registration', '2013-10-07 08:23:19', '2013-10-07 08:23:19', '[]', 'link', 'vYYuhWXBfXKzBC+BlnbDmXfBKsUWY6SU/v04gHF9GYzPjFP51RXDPOc57R7Dpbf+XLkbPNAkmem33Crz/avdrw==', 'choose_method', 'a251ebc2-880c-4f76-a8f3-38e6940eab0e', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'api'); | ||
INSERT INTO selfservice_recovery_flow_methods (id, method, selfservice_recovery_request_id, config, created_at, updated_at) | ||
VALUES ('1a45ce9b-b527-4535-ad31-b808e481d280', 'link', '0d14427f-e16d-43a5-8695-8278bf85d4eb', '{"action":"http://127.0.0.1:4455/.ory/kratos/public/self-service/browser/flows/settings/strategies/profile?request=21c5f714-3089-49d2-b387-f244d4dd9e00","method":"POST","fields":[{"name":"csrf_token","type":"hidden","required":true,"value":"yDwSg0quCmc4kBl7lBqYwGh4W8awrc+TpeWiigZs3iemRCwqeDhGdrW3sIv8T7u742pN+Kryx/NrdRpEXcT9qA=="},{"name":"traits.email","type":"text","value":"foo","errors":[{"message":"validation failed"},{"message":"foo is not valid email"},{"message":"foo is not valid email"}]}]}', '2013-10-07 08:23:19', '2013-10-07 08:23:19'); |
Oops, something went wrong.