-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use golden files for converter testings (#19168)
* Use golden files for converter testings * Add tips if test failed * Make results of enum human-readable * Add copyright
- Loading branch information
1 parent
555c738
commit be35ce1
Showing
87 changed files
with
1,279 additions
and
1,018 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ packages: | |
- name: lib | ||
type: yarn | ||
srcs: | ||
- fixtures/** | ||
- src/** | ||
- package.json | ||
- tsconfig.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 @@ | ||
# Public API TypeScript Common | ||
|
||
## Golden tests | ||
|
||
Golden tests are used to test the output of a function against a known good output. The output is stored in a file with the same name as the test file but with a `.golden` extension. The test will fail if the output does not match the golden file. | ||
|
||
We use golden tests for public api data conversion functions. We put the fixtures input and golden results in the `../fixtures` folder. | ||
|
||
See example below: | ||
|
||
```ts | ||
it("toOrganizationMember", async () => { | ||
await startFixtureTest("../fixtures/toOrganizationMember_*.json", async (input) => | ||
converter.toOrganizationMember(input), | ||
); | ||
}); | ||
``` | ||
|
||
it will run the test for each file matching the glob pattern `../fixtures/toOrganizationMember_*.json`. The test will fail if the output does not match the `../fixtures/toOrganizationMember_*.golden` files. | ||
|
||
### How to veirfy golden files | ||
|
||
```bash | ||
yarn test | ||
``` | ||
|
||
### How to update golden files | ||
|
||
```bash | ||
yarn test:forceUpdate | ||
``` | ||
|
||
### How to generate input json files | ||
|
||
```bash | ||
node scripts/new-fixtures.js [your_testing_name] [the_number_of_input_files] | ||
``` |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_1.golden
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,4 @@ | ||
{ | ||
"result": "owner", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_1.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 @@ | ||
"OWNER" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_2.golden
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,4 @@ | ||
{ | ||
"result": "member", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_2.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 @@ | ||
"MEMBER" |
3 changes: 3 additions & 0 deletions
3
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_3.golden
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,3 @@ | ||
{ | ||
"err": "unknown org member role 0" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_3.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 @@ | ||
"UNSPECIFIED" |
3 changes: 3 additions & 0 deletions
3
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_4_error.golden
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,3 @@ | ||
{ | ||
"err": "unknown org member role undefined" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/fromOrgMemberRole_revert_4_error.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 @@ | ||
"NONE" |
7 changes: 7 additions & 0 deletions
7
components/public-api/typescript-common/fixtures/fromPartialConfiguration_1.golden
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,7 @@ | ||
{ | ||
"result": { | ||
"id": "123", | ||
"name": "My Config" | ||
}, | ||
"err": "" | ||
} |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/fromPartialConfiguration_1.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,4 @@ | ||
{ | ||
"id": "123", | ||
"name": "My Config" | ||
} |
15 changes: 15 additions & 0 deletions
15
components/public-api/typescript-common/fixtures/fromPartialConfiguration_2.golden
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,15 @@ | ||
{ | ||
"result": { | ||
"id": "123", | ||
"settings": { | ||
"prebuilds": { | ||
"enable": true, | ||
"prebuildInterval": 5 | ||
}, | ||
"workspaceClasses": { | ||
"regular": "huge" | ||
} | ||
} | ||
}, | ||
"err": "" | ||
} |
10 changes: 10 additions & 0 deletions
10
components/public-api/typescript-common/fixtures/fromPartialConfiguration_2.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,10 @@ | ||
{ | ||
"id": "123", | ||
"workspaceSettings": { | ||
"workspaceClass": "huge" | ||
}, | ||
"prebuildSettings": { | ||
"enabled": true, | ||
"prebuildInterval": 5 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
components/public-api/typescript-common/fixtures/toAuthProviderDescription_1.golden
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,10 @@ | ||
{ | ||
"result": { | ||
"id": "ap123", | ||
"type": "AUTH_PROVIDER_TYPE_GITHUB", | ||
"host": "localhost", | ||
"icon": "unused icon", | ||
"description": "unused description" | ||
}, | ||
"err": "" | ||
} |
11 changes: 11 additions & 0 deletions
11
components/public-api/typescript-common/fixtures/toAuthProviderDescription_1.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,11 @@ | ||
{ | ||
"authProviderId": "ap123", | ||
"authProviderType": "GitHub", | ||
"host": "localhost", | ||
"verified": true, | ||
"icon": "unused icon", | ||
"description": "unused description", | ||
"settingsUrl": "unused", | ||
"ownerId": "unused", | ||
"organizationId": "unused" | ||
} |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toAuthProviderType_1.golden
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,4 @@ | ||
{ | ||
"result": "GITHUB", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toAuthProviderType_1.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 @@ | ||
"GitHub" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toAuthProviderType_2.golden
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,4 @@ | ||
{ | ||
"result": "GITLAB", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toAuthProviderType_2.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 @@ | ||
"GitLab" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toAuthProviderType_3.golden
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,4 @@ | ||
{ | ||
"result": "BITBUCKET", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toAuthProviderType_3.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 @@ | ||
"Bitbucket" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toAuthProviderType_4.golden
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,4 @@ | ||
{ | ||
"result": "BITBUCKET_SERVER", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toAuthProviderType_4.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 @@ | ||
"BitbucketServer" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toAuthProviderType_5.golden
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,4 @@ | ||
{ | ||
"result": "UNSPECIFIED", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toAuthProviderType_5.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 @@ | ||
"Other" |
19 changes: 19 additions & 0 deletions
19
components/public-api/typescript-common/fixtures/toAuthProvider_1.golden
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,19 @@ | ||
{ | ||
"result": { | ||
"id": "ap123", | ||
"organizationId": "orgId123", | ||
"type": "AUTH_PROVIDER_TYPE_GITHUB", | ||
"host": "localhost", | ||
"icon": "", | ||
"description": "", | ||
"settingsUrl": "", | ||
"verified": false, | ||
"enableLogin": false, | ||
"scopes": [], | ||
"oauth2Config": { | ||
"clientId": "clientId123", | ||
"clientSecret": "should not appear in result" | ||
} | ||
}, | ||
"err": "" | ||
} |
15 changes: 15 additions & 0 deletions
15
components/public-api/typescript-common/fixtures/toAuthProvider_1.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,15 @@ | ||
{ | ||
"id": "ap123", | ||
"type": "GitHub", | ||
"host": "localhost", | ||
"status": "pending", | ||
"ownerId": "userId", | ||
"organizationId": "orgId123", | ||
"oauth": { | ||
"clientId": "clientId123", | ||
"clientSecret": "should not appear in result", | ||
"callBackUrl": "localhost/callback", | ||
"authorizationUrl": "auth.service/authorize", | ||
"tokenUrl": "auth.service/token" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
components/public-api/typescript-common/fixtures/toBlockedEmailDomain_1.golden
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,8 @@ | ||
{ | ||
"result": { | ||
"id": "", | ||
"domain": "example.com", | ||
"negative": false | ||
}, | ||
"err": "" | ||
} |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toBlockedEmailDomain_1.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,4 @@ | ||
{ | ||
"domain": "example.com", | ||
"negative": false | ||
} |
10 changes: 10 additions & 0 deletions
10
components/public-api/typescript-common/fixtures/toBlockedRepository_1.golden
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,10 @@ | ||
{ | ||
"result": { | ||
"id": 2023, | ||
"urlRegexp": "*/*", | ||
"blockUser": false, | ||
"creationTime": "2023-11-29T18:17:16.194Z", | ||
"updateTime": "2023-11-29T18:17:16.194Z" | ||
}, | ||
"err": "" | ||
} |
7 changes: 7 additions & 0 deletions
7
components/public-api/typescript-common/fixtures/toBlockedRepository_1.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,7 @@ | ||
{ | ||
"id": 2023, | ||
"urlRegexp": "*/*", | ||
"blockUser": false, | ||
"createdAt": "2023-11-29T18:17:16.194Z", | ||
"updatedAt": "2023-11-29T18:17:16.194Z" | ||
} |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_1.golden
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,4 @@ | ||
{ | ||
"result": "DEFAULT_BRANCH", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_1.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 @@ | ||
"default-branch" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_2.golden
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,4 @@ | ||
{ | ||
"result": "ALL_BRANCHES", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_2.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 @@ | ||
"all-branches" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_3.golden
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,4 @@ | ||
{ | ||
"result": "MATCHED_BRANCHES", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_3.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 @@ | ||
"matched-branches" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_4.golden
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,4 @@ | ||
{ | ||
"result": "DEFAULT_BRANCH", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toBranchMatchingStrategy_4.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 @@ | ||
null |
9 changes: 9 additions & 0 deletions
9
components/public-api/typescript-common/fixtures/toConfigurationEnvironmentVariable_1.golden
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,9 @@ | ||
{ | ||
"result": { | ||
"id": "1", | ||
"name": "FOO", | ||
"configurationId": "1", | ||
"admission": "ENVIRONMENT_VARIABLE_ADMISSION_PREBUILD" | ||
}, | ||
"err": "" | ||
} |
6 changes: 6 additions & 0 deletions
6
components/public-api/typescript-common/fixtures/toConfigurationEnvironmentVariable_1.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,6 @@ | ||
{ | ||
"id": "1", | ||
"name": "FOO", | ||
"censored": true, | ||
"projectId": "1" | ||
} |
20 changes: 20 additions & 0 deletions
20
components/public-api/typescript-common/fixtures/toConfiguration_1.golden
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,20 @@ | ||
{ | ||
"result": { | ||
"id": "123", | ||
"organizationId": "456", | ||
"name": "My Project", | ||
"cloneUrl": "https://github.com/myorg/myproject.git", | ||
"creationTime": "2023-11-29T17:52:27.467Z", | ||
"prebuildSettings": { | ||
"enabled": true, | ||
"branchMatchingPattern": "main", | ||
"branchStrategy": "BRANCH_MATCHING_STRATEGY_DEFAULT_BRANCH", | ||
"prebuildInterval": 20, | ||
"workspaceClass": "dev" | ||
}, | ||
"workspaceSettings": { | ||
"workspaceClass": "dev" | ||
} | ||
}, | ||
"err": "" | ||
} |
20 changes: 20 additions & 0 deletions
20
components/public-api/typescript-common/fixtures/toConfiguration_1.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,20 @@ | ||
{ | ||
"id": "123", | ||
"teamId": "456", | ||
"name": "My Project", | ||
"cloneUrl": "https://github.com/myorg/myproject.git", | ||
"appInstallationId": "", | ||
"creationTime": "2023-11-29T17:52:27.467Z", | ||
"settings": { | ||
"workspaceClasses": { | ||
"regular": "dev" | ||
}, | ||
"prebuilds": { | ||
"enable": true, | ||
"branchMatchingPattern": "main", | ||
"branchStrategy": "default-branch", | ||
"prebuildInterval": 20, | ||
"workspaceClass": "dev" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
components/public-api/typescript-common/fixtures/toEnvironmentVariables_1.golden
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,9 @@ | ||
{ | ||
"result": [ | ||
{ | ||
"name": "FOO", | ||
"value": "bar" | ||
} | ||
], | ||
"err": "" | ||
} |
9 changes: 9 additions & 0 deletions
9
components/public-api/typescript-common/fixtures/toEnvironmentVariables_1.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,9 @@ | ||
{ | ||
"title": "title", | ||
"envvars": [ | ||
{ | ||
"name": "FOO", | ||
"value": "bar" | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_1.golden
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,4 @@ | ||
{ | ||
"result": "OWNER", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_1.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 @@ | ||
"owner" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_2.golden
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,4 @@ | ||
{ | ||
"result": "MEMBER", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_2.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 @@ | ||
"member" |
4 changes: 4 additions & 0 deletions
4
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_3.golden
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,4 @@ | ||
{ | ||
"result": "UNSPECIFIED", | ||
"err": "" | ||
} |
1 change: 1 addition & 0 deletions
1
components/public-api/typescript-common/fixtures/toOrgMemberRole_happyPath_3.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 @@ | ||
"unknown" |
12 changes: 12 additions & 0 deletions
12
components/public-api/typescript-common/fixtures/toOrganizationMember_happyPath_1.golden
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,12 @@ | ||
{ | ||
"result": { | ||
"userId": "456", | ||
"role": "ORGANIZATION_ROLE_OWNER", | ||
"memberSince": "2022-01-01T00:00:00Z", | ||
"avatarUrl": "https://example.com/avatar.jpg", | ||
"fullName": "John Doe", | ||
"email": "[email protected]", | ||
"ownedByOrganization": true | ||
}, | ||
"err": "" | ||
} |
9 changes: 9 additions & 0 deletions
9
components/public-api/typescript-common/fixtures/toOrganizationMember_happyPath_1.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,9 @@ | ||
{ | ||
"userId": "456", | ||
"fullName": "John Doe", | ||
"primaryEmail": "[email protected]", | ||
"avatarUrl": "https://example.com/avatar.jpg", | ||
"role": "owner", | ||
"memberSince": "2022-01-01T00:00:00.000Z", | ||
"ownedByOrganization": true | ||
} |
9 changes: 9 additions & 0 deletions
9
components/public-api/typescript-common/fixtures/toOrganization_happyPath_1.golden
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,9 @@ | ||
{ | ||
"result": { | ||
"id": "123", | ||
"name": "My Org", | ||
"creationTime": "2022-01-01T00:00:00Z", | ||
"slug": "my-org" | ||
}, | ||
"err": "" | ||
} |
Oops, something went wrong.