(Feat): Initial Commit
This commit is contained in:
14
test/testdata/android-assetlinks.json
vendored
Normal file
14
test/testdata/android-assetlinks.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"relation": [
|
||||
"delegate_permission/common.handle_all_urls"
|
||||
],
|
||||
"target": {
|
||||
"namespace": "android_app",
|
||||
"package_name": "test.at.aaa.b2b",
|
||||
"sha256_cert_fingerprints": [
|
||||
"BB:A6:3E:A7:91:F4:05:2C:6D:47:8B:1A:3F:C5:9E:0D:7B:2F:1A:E8:D5:6C:10:52:8B:F4:B7:A9:1D:C3:57:43"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
18
test/testdata/apple-app-site-association.json
vendored
Normal file
18
test/testdata/apple-app-site-association.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"applinks": {
|
||||
"apps": [],
|
||||
"details": [
|
||||
{
|
||||
"appID": "test.at.aaa.b2b",
|
||||
"paths": [
|
||||
"/api/v*/auth/register"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"webcredentials": {
|
||||
"apps": [
|
||||
"test.at.aaa.b2b"
|
||||
]
|
||||
}
|
||||
}
|
||||
BIN
test/testdata/example.jpg
vendored
Normal file
BIN
test/testdata/example.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
45
test/testdata/plain.sql
vendored
Normal file
45
test/testdata/plain.sql
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
-- Dumped from database version 12.4
|
||||
-- Dumped by pg_dump version 12.4
|
||||
SET statement_timeout = 0;
|
||||
|
||||
SET lock_timeout = 0;
|
||||
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
|
||||
SET client_encoding = 'UTF8';
|
||||
|
||||
SET standard_conforming_strings = ON;
|
||||
|
||||
SELECT
|
||||
pg_catalog.set_config('search_path', '', FALSE);
|
||||
|
||||
SET check_function_bodies = FALSE;
|
||||
|
||||
SET xmloption = content;
|
||||
|
||||
SET client_min_messages = warning;
|
||||
|
||||
SET row_security = OFF;
|
||||
|
||||
DROP EXTENSION IF EXISTS "uuid-ossp";
|
||||
|
||||
--
|
||||
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
|
||||
|
||||
--
|
||||
-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
|
||||
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
14
test/testdata/snapshots/TestGetAndroidWellKnown.golden
vendored
Normal file
14
test/testdata/snapshots/TestGetAndroidWellKnown.golden
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"relation": [
|
||||
"delegate_permission/common.handle_all_urls"
|
||||
],
|
||||
"target": {
|
||||
"namespace": "android_app",
|
||||
"package_name": "test.at.aaa.b2b",
|
||||
"sha256_cert_fingerprints": [
|
||||
"BB:A6:3E:A7:91:F4:05:2C:6D:47:8B:1A:3F:C5:9E:0D:7B:2F:1A:E8:D5:6C:10:52:8B:F4:B7:A9:1D:C3:57:43"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
18
test/testdata/snapshots/TestGetAppleWellKnown.golden
vendored
Normal file
18
test/testdata/snapshots/TestGetAppleWellKnown.golden
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"applinks": {
|
||||
"apps": [],
|
||||
"details": [
|
||||
{
|
||||
"appID": "test.at.aaa.b2b",
|
||||
"paths": [
|
||||
"/api/v*/auth/register"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"webcredentials": {
|
||||
"apps": [
|
||||
"test.at.aaa.b2b"
|
||||
]
|
||||
}
|
||||
}
|
||||
30
test/testdata/snapshots/TestGetCompleteRegister.golden
vendored
Normal file
30
test/testdata/snapshots/TestGetCompleteRegister.golden
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Account confirmation</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="status">Processing request...</div>
|
||||
|
||||
<script>
|
||||
function processConfirmation() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', "http://localhost:8080/api/v1/auth/register/c9182e0b-4a46-4825-9f10-56f04a8b1665", true);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
document.getElementById('status').textContent = 'Successfully confirmed account.';
|
||||
} else {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
}
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
};
|
||||
xhr.send(JSON.stringify({}));
|
||||
}
|
||||
|
||||
window.onload = processConfirmation;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
8
test/testdata/snapshots/TestGetUserInfo.golden
vendored
Normal file
8
test/testdata/snapshots/TestGetUserInfo.golden
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
(types.GetUserInfoResponse) {
|
||||
Email: (strfmt.Email) (len=17) user1@example.com,
|
||||
Scopes: ([]string) (len=1) {
|
||||
(string) (len=3) "app"
|
||||
},
|
||||
Sub: (*string)((len=36) "f6ede5d8-e22a-4ca5-aa12-67821865a3e5"),
|
||||
UpdatedAt: <redacted>,
|
||||
}
|
||||
2
test/testdata/snapshots/TestILikeArgs.golden
vendored
Normal file
2
test/testdata/snapshots/TestILikeArgs.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
(string) (len=12) "%Max.Muster%"
|
||||
(string) (len=3) "Max"
|
||||
1
test/testdata/snapshots/TestILikeSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestILikeSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=171) "SELECT * FROM \"users\" INNER JOIN app_user_profiles ON app_user_profiles.user_id=users.id WHERE (users.username ILIKE $1) AND (users.app_user_profiles.first_name ILIKE $2);"
|
||||
2
test/testdata/snapshots/TestILikeSearchArgs.golden
vendored
Normal file
2
test/testdata/snapshots/TestILikeSearchArgs.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
(string) (len=10) "%mus\\%ter%"
|
||||
(string) (len=7) "%m\\_ax%"
|
||||
1
test/testdata/snapshots/TestILikeSearchSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestILikeSearchSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=149) "SELECT * FROM \"users\" INNER JOIN app_user_profiles ON app_user_profiles.user_id=users.id WHERE (users.username ILIKE $1 AND users.username ILIKE $2);"
|
||||
0
test/testdata/snapshots/TestLeftOuterJoinArgs.golden
vendored
Normal file
0
test/testdata/snapshots/TestLeftOuterJoinArgs.golden
vendored
Normal file
1
test/testdata/snapshots/TestLeftOuterJoinSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestLeftOuterJoinSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=88) "SELECT * FROM \"users\" LEFT JOIN app_user_profiles ON app_user_profiles.user_id=users.id;"
|
||||
1
test/testdata/snapshots/TestLeftOuterJoinWithFilterArgs.golden
vendored
Normal file
1
test/testdata/snapshots/TestLeftOuterJoinWithFilterArgs.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=3) "Max"
|
||||
1
test/testdata/snapshots/TestLeftOuterJoinWithFilterSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestLeftOuterJoinWithFilterSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=124) "SELECT * FROM \"users\" LEFT JOIN app_user_profiles ON app_user_profiles.user_id=users.id AND app_user_profiles.first_name=$1;"
|
||||
1
test/testdata/snapshots/TestLogErrorFuncWithRequestInfo.golden
vendored
Normal file
1
test/testdata/snapshots/TestLogErrorFuncWithRequestInfo.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"status":500,"title":"Internal Server Error","type":"generic"}
|
||||
5
test/testdata/snapshots/TestNINArgs.golden
vendored
Normal file
5
test/testdata/snapshots/TestNINArgs.golden
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
(pq.StringArray) (len=3) {
|
||||
(string) (len=3) "max",
|
||||
(string) (len=6) "muster",
|
||||
(string) (len=5) "peter"
|
||||
}
|
||||
1
test/testdata/snapshots/TestNINSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestNINSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=135) "SELECT * FROM \"users\" INNER JOIN app_user_profiles ON app_user_profiles.user_id=users.id WHERE (app_user_profiles.username <> all($1));"
|
||||
1
test/testdata/snapshots/TestNotFound-AcceptApplicationJSON.golden
vendored
Normal file
1
test/testdata/snapshots/TestNotFound-AcceptApplicationJSON.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=52) "{\"status\":404,\"title\":\"Not Found\",\"type\":\"generic\"}\n"
|
||||
1
test/testdata/snapshots/TestNotFound-AcceptTextHTML.golden
vendored
Normal file
1
test/testdata/snapshots/TestNotFound-AcceptTextHTML.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=181) "<html><body><h1>Page Not Found</h1><p>The page you are looking for does not exist. Did you mean to visit <a href=\"http://localhost:3000\">http://localhost:3000</a>?</p></body></html>"
|
||||
10
test/testdata/snapshots/TestOrArgs.golden
vendored
Normal file
10
test/testdata/snapshots/TestOrArgs.golden
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
(int) 123
|
||||
(string) (len=22) "max.muster@example.org"
|
||||
(string) (len=3) "Max"
|
||||
(string) (len=6) "Muster"
|
||||
(string) (len=7) "Austria"
|
||||
(*pq.StringArray)((len=2) {
|
||||
(string) (len=3) "app",
|
||||
(string) (len=9) "user_info"
|
||||
})
|
||||
(int) 42
|
||||
1
test/testdata/snapshots/TestOrSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestOrSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=247) "SELECT * FROM \"users\" WHERE (id = $1 OR username = $2 OR (users.profile->>'firstName' = $3 AND users.profile->>'lastName' = $4 AND users.profile->>'country' = $5 AND users.profile->'scopes' <@ to_jsonb($6::text[]) AND users.profile->>'age' = $7));"
|
||||
89
test/testdata/snapshots/TestParseModel_Success.golden
vendored
Normal file
89
test/testdata/snapshots/TestParseModel_Success.golden
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
(*scaffold.StorageResource)({
|
||||
Name: (string) (len=12) "TestResource",
|
||||
Fields: ([]scaffold.Field) (len=14) {
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=2) "ID",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=6) "string"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=12) "NumericField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=13) "types.Decimal"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=16) "NumericNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=17) "types.NullDecimal"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=12) "IntegerField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=3) "int"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=16) "IntegerNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=8) "null.Int"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=9) "BoolField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=4) "bool"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=13) "BoolNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=9) "null.Bool"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=12) "DecimalField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=13) "types.Decimal"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=16) "DecimalNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=17) "types.NullDecimal"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=9) "TextField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=6) "string"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=13) "TextNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=11) "null.String"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=21) "TimtestamptzNullField",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=9) "null.Time"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=9) "CreatedAt",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=9) "time.Time"
|
||||
}
|
||||
},
|
||||
(scaffold.Field) {
|
||||
Name: (string) (len=9) "UpdatedAt",
|
||||
Type: (scaffold.FieldType) {
|
||||
Name: (string) (len=9) "time.Time"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-EmptyCurrentPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-EmptyCurrentPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: currentPassword (in body): currentPassword in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-EmptyNewPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-EmptyNewPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: newPassword (in body): newPassword in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-MissingCurrentPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-MissingCurrentPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: currentPassword (in body): currentPassword in body is required
|
||||
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-MissingNewPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostChangePasswordBadRequest-MissingNewPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: newPassword (in body): newPassword in body is required
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-EmptyUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-EmptyUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-InvalidUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-InvalidUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body must be of type email: "definitely not an email"
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-MissingUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordBadRequest-MissingUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body is required
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-EmptyPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-EmptyPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-EmptyToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-EmptyToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: token (in body): token in body must be of type uuid4: ""
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-InvalidToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-InvalidToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: token (in body): token in body must be of type uuid4: "definitelydoesnotexist"
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-MissingPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-MissingPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body is required
|
||||
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-MissingToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostForgotPasswordCompleteBadRequest-MissingToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: token (in body): token in body is required
|
||||
6
test/testdata/snapshots/TestPostForgotPasswordCompleteSuccess.golden
vendored
Normal file
6
test/testdata/snapshots/TestPostForgotPasswordCompleteSuccess.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
(types.PostLoginResponse) {
|
||||
AccessToken: <redacted>,
|
||||
ExpiresIn: (*int64)(86400),
|
||||
RefreshToken: <redacted>,
|
||||
TokenType: (*string)((len=6) "bearer")
|
||||
}
|
||||
1
test/testdata/snapshots/TestPostLoginBadRequest-EmptyPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLoginBadRequest-EmptyPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostLoginBadRequest-EmptyUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLoginBadRequest-EmptyUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostLoginBadRequest-InvalidUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLoginBadRequest-InvalidUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body must be of type email: "definitely not an email"
|
||||
1
test/testdata/snapshots/TestPostLoginBadRequest-MissingPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLoginBadRequest-MissingPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body is required
|
||||
1
test/testdata/snapshots/TestPostLoginBadRequest-MissingUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLoginBadRequest-MissingUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body is required
|
||||
1
test/testdata/snapshots/TestPostLogoutInvalidRefreshToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostLogoutInvalidRefreshToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: refresh_token (in body): refresh_token in body must be of type uuid4: "not my refresh token"
|
||||
1
test/testdata/snapshots/TestPostRefreshBadRequest-EmptyRefreshToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRefreshBadRequest-EmptyRefreshToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: refresh_token (in body): refresh_token in body must be of type uuid4: ""
|
||||
1
test/testdata/snapshots/TestPostRefreshBadRequest-InvalidToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRefreshBadRequest-InvalidToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: refresh_token (in body): refresh_token in body must be of type uuid4: "not a valid token"
|
||||
1
test/testdata/snapshots/TestPostRefreshBadRequest-MissingRefreshToken.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRefreshBadRequest-MissingRefreshToken.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: refresh_token (in body): refresh_token in body is required
|
||||
1
test/testdata/snapshots/TestPostRegisterBadRequest-EmptyPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRegisterBadRequest-EmptyPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostRegisterBadRequest-EmptyUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRegisterBadRequest-EmptyUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body should be at least 1 chars long
|
||||
1
test/testdata/snapshots/TestPostRegisterBadRequest-InvalidUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRegisterBadRequest-InvalidUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body must be of type email: "definitely not an email"
|
||||
1
test/testdata/snapshots/TestPostRegisterBadRequest-MissingPassword.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRegisterBadRequest-MissingPassword.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: password (in body): password in body is required
|
||||
1
test/testdata/snapshots/TestPostRegisterBadRequest-MissingUsername.golden
vendored
Normal file
1
test/testdata/snapshots/TestPostRegisterBadRequest-MissingUsername.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(httperrors.HTTPValidationError) HTTPValidationError 400 (generic): Bad Request - Validation: username (in body): username in body is required
|
||||
8
test/testdata/snapshots/TestSaveResponseAndValidate.golden
vendored
Normal file
8
test/testdata/snapshots/TestSaveResponseAndValidate.golden
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
(*types.GetUserInfoResponse)({
|
||||
Email: <redacted>,
|
||||
Scopes: ([]string) (len=1) {
|
||||
(string) (len=3) "app"
|
||||
},
|
||||
Sub: (*string)((len=36) "f6ede5d8-e22a-4ca5-aa12-67821865a3e5"),
|
||||
UpdatedAt: <redacted>,
|
||||
})
|
||||
8
test/testdata/snapshots/TestSaveResponseAndValidateJSON.golden
vendored
Normal file
8
test/testdata/snapshots/TestSaveResponseAndValidateJSON.golden
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"email": <redacted>,
|
||||
"scopes": [
|
||||
"app"
|
||||
],
|
||||
"sub": "f6ede5d8-e22a-4ca5-aa12-67821865a3e5",
|
||||
"updated_at": <redacted>,
|
||||
}
|
||||
7
test/testdata/snapshots/TestSnapshot.golden
vendored
Normal file
7
test/testdata/snapshots/TestSnapshot.golden
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(struct { A string; B int; C bool; D *string }) {
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
(string) (len=12) "Hello World!"
|
||||
19
test/testdata/snapshots/TestSnapshotJSONJSON.golden
vendored
Normal file
19
test/testdata/snapshots/TestSnapshotJSONJSON.golden
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"ID": <redacted>,
|
||||
"A": "foo",
|
||||
"B": 1,
|
||||
"C": true,
|
||||
"D": {
|
||||
"Foo": "skip me",
|
||||
"Bar": 3
|
||||
},
|
||||
"E": [
|
||||
"skip me",
|
||||
"skip me too"
|
||||
],
|
||||
"F": {
|
||||
"skip me": 1,
|
||||
"skip me three": 3,
|
||||
"skip me too": 2
|
||||
}
|
||||
}
|
||||
BIN
test/testdata/snapshots/TestSnapshotSaveBytesImage.jpg
vendored
Normal file
BIN
test/testdata/snapshots/TestSnapshotSaveBytesImage.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
7
test/testdata/snapshots/TestSnapshotShouldFail.golden
vendored
Normal file
7
test/testdata/snapshots/TestSnapshotShouldFail.golden
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(struct { A string; B int; C bool; D *string }) {
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
(string) (len=12) "Hello World!"
|
||||
7
test/testdata/snapshots/TestSnapshotSkipFields.golden
vendored
Normal file
7
test/testdata/snapshots/TestSnapshotSkipFields.golden
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(struct { ID string; A string; B int; C bool; D *string }) {
|
||||
ID: <redacted>,
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
9
test/testdata/snapshots/TestSnapshotSkipMultilineFields.golden
vendored
Normal file
9
test/testdata/snapshots/TestSnapshotSkipMultilineFields.golden
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
(struct { ID string; A string; B int; C bool; D interface {}; E []string; F map[string]int }) {
|
||||
ID: <redacted>,
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (struct { Foo string; Bar int }) { <redacted> },
|
||||
E: ([]string) (len=2) { <redacted> },
|
||||
F: (map[string]int) (len=3) { <redacted> }
|
||||
}
|
||||
10
test/testdata/snapshots/TestSnapshotSkipPrefixedFields.golden
vendored
Normal file
10
test/testdata/snapshots/TestSnapshotSkipPrefixedFields.golden
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
(struct { ID string; OtherIDStr string; OtherIDInt int; OtherIDBool bool; OtherIDPTR *string; OtherIDStruct struct { ID string } }) {
|
||||
ID: <redacted>,
|
||||
OtherIDStr: (string) (len=6) "id str",
|
||||
OtherIDInt: (int) 4,
|
||||
OtherIDBool: (bool) true,
|
||||
OtherIDPTR: (*string)((len=10) "ID str ptr"),
|
||||
OtherIDStruct: (struct { ID string }) {
|
||||
ID: <redacted>,
|
||||
}
|
||||
}
|
||||
6
test/testdata/snapshots/TestSnapshotWithLabel_A.golden
vendored
Normal file
6
test/testdata/snapshots/TestSnapshotWithLabel_A.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
(struct { A string; B int; C bool; D *string }) {
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
1
test/testdata/snapshots/TestSnapshotWithLabel_B.golden
vendored
Normal file
1
test/testdata/snapshots/TestSnapshotWithLabel_B.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=12) "Hello World!"
|
||||
7
test/testdata/snapshots/TestSnapshotWithReplacer.golden
vendored
Normal file
7
test/testdata/snapshots/TestSnapshotWithReplacer.golden
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(struct { ID string; A string; B int; C bool; D *string }) {
|
||||
ID: <redacted>,
|
||||
A: (string) (len=3) "foo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
7
test/testdata/snapshots/TestSnapshotWithUpdate.golden
vendored
Normal file
7
test/testdata/snapshots/TestSnapshotWithUpdate.golden
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(struct { A string; B int; C bool; D *string }) {
|
||||
A: (string) (len=2) "fo",
|
||||
B: (int) 1,
|
||||
C: (bool) true,
|
||||
D: (*string)((len=3) "bar")
|
||||
}
|
||||
(string) (len=12) "Hello World!"
|
||||
5
test/testdata/snapshots/TestWhereInArgs.golden
vendored
Normal file
5
test/testdata/snapshots/TestWhereInArgs.golden
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
(pq.StringArray) (len=3) {
|
||||
(string) (len=3) "max",
|
||||
(string) (len=6) "muster",
|
||||
(string) (len=5) "peter"
|
||||
}
|
||||
1
test/testdata/snapshots/TestWhereInSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestWhereInSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=134) "SELECT * FROM \"users\" INNER JOIN app_user_profiles ON app_user_profiles.user_id=users.id WHERE (app_user_profiles.username = any($1));"
|
||||
1
test/testdata/snapshots/TestWhereJSONStringArgs.golden
vendored
Normal file
1
test/testdata/snapshots/TestWhereJSONStringArgs.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=37) "https://example.org/users/123/profile"
|
||||
1
test/testdata/snapshots/TestWhereJSONStringSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestWhereJSONStringSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=55) "SELECT * FROM \"users\" WHERE (users.profile::text = $1);"
|
||||
14
test/testdata/snapshots/TestWhereJSONStructArgs.golden
vendored
Normal file
14
test/testdata/snapshots/TestWhereJSONStructArgs.golden
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
(string) (len=3) "Max"
|
||||
(string) (len=6) "Muster"
|
||||
(string) (len=7) "Austria"
|
||||
(*pq.StringArray)((len=2) {
|
||||
(string) (len=3) "app",
|
||||
(string) (len=9) "user_info"
|
||||
})
|
||||
(int) 42
|
||||
(pq.GenericArray) {
|
||||
A: ([2]string) (len=2) {
|
||||
(string) (len=15) "+1 206 555 0100",
|
||||
(string) (len=16) "+44 113 496 0000"
|
||||
}
|
||||
}
|
||||
8
test/testdata/snapshots/TestWhereJSONStructCompositionArgs.golden
vendored
Normal file
8
test/testdata/snapshots/TestWhereJSONStructCompositionArgs.golden
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
(string) (len=3) "Max"
|
||||
(string) (len=6) "Muster"
|
||||
(string) (len=7) "Austria"
|
||||
(*pq.StringArray)((len=2) {
|
||||
(string) (len=3) "app",
|
||||
(string) (len=9) "user_info"
|
||||
})
|
||||
(int) 42
|
||||
1
test/testdata/snapshots/TestWhereJSONStructCompositionSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestWhereJSONStructCompositionSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=217) "SELECT * FROM \"users\" WHERE (users.profile->>'firstName' = $1 AND users.profile->>'lastName' = $2 AND users.profile->>'country' = $3 AND users.profile->'scopes' <@ to_jsonb($4::text[]) AND users.profile->>'age' = $5);"
|
||||
1
test/testdata/snapshots/TestWhereJSONStructSQL.golden
vendored
Normal file
1
test/testdata/snapshots/TestWhereJSONStructSQL.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(string) (len=275) "SELECT * FROM \"users\" WHERE (users.profile->>'firstName' = $1 AND users.profile->>'lastName' = $2 AND users.profile->>'country' = $3 AND users.profile->'scopes' <@ to_jsonb($4::text[]) AND users.profile->>'age' = $5 AND users.profile->'phoneNumbers' <@ to_jsonb($6::text[]));"
|
||||
90
test/testdata/users.sql
vendored
Normal file
90
test/testdata/users.sql
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
-- Dumped from database version 12.4
|
||||
-- Dumped by pg_dump version 12.4
|
||||
SET statement_timeout = 0;
|
||||
|
||||
SET lock_timeout = 0;
|
||||
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
|
||||
SET client_encoding = 'UTF8';
|
||||
|
||||
SET standard_conforming_strings = ON;
|
||||
|
||||
SELECT
|
||||
pg_catalog.set_config('search_path', '', FALSE);
|
||||
|
||||
SET check_function_bodies = FALSE;
|
||||
|
||||
SET xmloption = content;
|
||||
|
||||
SET client_min_messages = warning;
|
||||
|
||||
SET row_security = OFF;
|
||||
|
||||
ALTER TABLE IF EXISTS ONLY public.users
|
||||
DROP CONSTRAINT IF EXISTS users_username_key;
|
||||
|
||||
ALTER TABLE IF EXISTS ONLY public.users
|
||||
DROP CONSTRAINT IF EXISTS users_pkey;
|
||||
|
||||
DROP TABLE IF EXISTS public.users;
|
||||
|
||||
DROP EXTENSION IF EXISTS "uuid-ossp";
|
||||
|
||||
--
|
||||
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
|
||||
|
||||
--
|
||||
-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
|
||||
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- Name: users; Type: TABLE; Schema: public; Owner: dbuser
|
||||
--
|
||||
CREATE TABLE public.users (
|
||||
id uuid DEFAULT public.uuid_generate_v4 () NOT NULL,
|
||||
username character varying(255),
|
||||
password text,
|
||||
is_active boolean NOT NULL,
|
||||
scopes text[] NOT NULL,
|
||||
last_authenticated_at timestamp with time zone,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
updated_at timestamp with time zone NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE public.users OWNER TO dbuser;
|
||||
|
||||
--
|
||||
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: dbuser
|
||||
--
|
||||
COPY public.users (id, username, password, is_active, scopes, last_authenticated_at, created_at, updated_at) FROM stdin;
|
||||
44a4b372-9d45-42a7-a4bd-9ba78b580e09 test_user1@example.com $argon2id$v=19$m=65536,t=1,p=4$bM/6DaUMUQlr8CPYHOcFwA$Cq0p8d3IKEy1+G3VfHRXDRdc15wHJtTx+UGsXD6bbWY t {app} 2020-09-16 14:39:34.098333+00 2020-09-16 12:37:27.034337+00 2020-09-16 14:39:34.098334+00
|
||||
738a3a72-2267-4727-beef-44193491c7d0 test_user2@example.com $argon2id$v=19$m=65536,t=1,p=4$goeC9sTUXfQMpLbdqHbIiA$nadmsRl8d0HTGuKOmjg1WGGOfvJkfPUb8aSj48t7upk t {app} 2020-11-10 13:28:11.259994+00 2020-11-10 13:28:11.259998+00 2020-11-10 13:28:11.259998+00
|
||||
8c39db83-c355-4e55-b10a-ac9bf0b15e50 test_user3@example.com $argon2id$v=19$m=65536,t=1,p=4$CWvCxZhldc/UmlZaHje7jg$igRKSJjHxlUR/5l21FX1aQIGbm+1J30/L1fLQGduy/U t {app} 2021-02-24 13:57:40.870073+00 2021-02-24 13:57:40.870076+00 2021-02-24 13:57:40.870076+00
|
||||
\.
|
||||
|
||||
--
|
||||
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: dbuser
|
||||
--
|
||||
ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
||||
|
||||
--
|
||||
-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: dbuser
|
||||
--
|
||||
ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_username_key UNIQUE (username);
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
69
test/testdata/uuid_extension_only.sql
vendored
Normal file
69
test/testdata/uuid_extension_only.sql
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
-- Dumped from database version 12.4
|
||||
-- Dumped by pg_dump version 12.10 (Debian 12.10-1.pgdg100+1)
|
||||
SET statement_timeout = 0;
|
||||
|
||||
SET lock_timeout = 0;
|
||||
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
|
||||
SET client_encoding = 'UTF8';
|
||||
|
||||
SET standard_conforming_strings = ON;
|
||||
|
||||
SELECT
|
||||
pg_catalog.set_config('search_path', '', FALSE);
|
||||
|
||||
SET check_function_bodies = FALSE;
|
||||
|
||||
SET xmloption = content;
|
||||
|
||||
SET client_min_messages = warning;
|
||||
|
||||
SET row_security = OFF;
|
||||
|
||||
ALTER TABLE IF EXISTS ONLY public.gorp_migrations
|
||||
DROP CONSTRAINT IF EXISTS gorp_migrations_pkey;
|
||||
|
||||
DROP TABLE IF EXISTS public.gorp_migrations;
|
||||
|
||||
DROP EXTENSION IF EXISTS "uuid-ossp";
|
||||
|
||||
--
|
||||
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
|
||||
|
||||
--
|
||||
-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
|
||||
|
||||
--
|
||||
-- Name: gorp_migrations; Type: TABLE; Schema: public; Owner: dbuser
|
||||
--
|
||||
CREATE TABLE public.gorp_migrations (
|
||||
id text NOT NULL,
|
||||
applied_at timestamp with time zone
|
||||
);
|
||||
|
||||
ALTER TABLE public.gorp_migrations OWNER TO dbuser;
|
||||
|
||||
--
|
||||
-- Data for Name: gorp_migrations; Type: TABLE DATA; Schema: public; Owner: dbuser
|
||||
--
|
||||
COPY public.gorp_migrations (id, applied_at) FROM stdin;
|
||||
20200428064736-install-extension-uuid.sql 2022-03-28 17:04:00.580862+00
|
||||
\.
|
||||
|
||||
--
|
||||
-- Name: gorp_migrations gorp_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: dbuser
|
||||
--
|
||||
ALTER TABLE ONLY public.gorp_migrations
|
||||
ADD CONSTRAINT gorp_migrations_pkey PRIMARY KEY (id);
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
Reference in New Issue
Block a user