Skip to content

Commit

Permalink
Clean up JSON Golden Tests in wire-api, Part #3 (#1733)
Browse files Browse the repository at this point in the history
* Limit the export of a golden test module to test objects only

* Clean up JSON golden tests for AssetToken

* Clean up JSON golden tests for NewAssetToken

* Clean up JSON golden tests for AssetRetention

* Clean up JSON golden tests for AssetSettings

* Clean up JSON golden tests for AssetKey

* Clean up JSON golden tests for ResumableSettings

* Clean up JSON golden instances for TotalSize

* Clean up JSON golden tests for ChunkSize

* Clean up JSON golden tests for Offset

* Clean up JSON golden tests for ResumableAsset

* Clean up JOSN golden tests for TurnHost

* Clean up JSON golden tests for Scheme (call configuration)

* Clean up JSON golden tests for Transport

* Clean up JSON golden tests for TurnURI

* Reformatting of Golden.Generated for better readability

* Clean up JSON golden tests for RTCIceServer

* Clean up JSON golden tests for RTCConfiguration

* Clean up JSON golden tests for SFTServer

* Clean up JSON golden tests for ConnectionRequest

* Clean up JSON golden tests for Relation

* Clean up JSON golden tests for Message

* Clean up JSON golden tests for UserConnection

* Clean up JSON golden tests for UserConnectionList

* Clean up JSON golden tests for ConnectionUpdate

* Remove redundant brackets in Golden.Generated

* Clean up JSON golden tests for Conversation

* Fix a failing golden test for Conversation

* Clean up JSON golden tests for NewConvUnmanaged

* Introduce a FromJSON testing utility for failure cases

* Further clean up of JSON golden tests of NewConvUnmanaged

* Clean up JSON golden tests for NewConvManaged

* Clean up JSON golden tests for ConversationList

* Clean up JSON golden tests for 'ConversationList Convevrsation'

* Clean up JSON golden tests for Access

* Clean up JSON golden tests for AccessRole

* Clean up JSON golden tests for ConvType

* Clean up JSON golden tests for ReceiptMode

* Clean up JSON golden tests for ConvTeamInfo

* Update the changelog

* Clean up JSON golden tests for Invite

* Clean up JSON golden tests for ConversationRename

* Clean up JSON golden tests for ConversationAccessUpdate

* Clean up JSON golden tests for ConversationReceiptModeUpdate

* Clean up JSON golden tests for ConversationMessageTimerUpdate

* Clean up JSON golden tests for AddBot

* Clean up JSON golden tests for AddBotResponse

* Clean up JSON golden tests for RemoveBotResponse

* Clean up JSON golden tests for UpdateBotPrekeys

* Clean up JSON golden tests for ConversationCode

* Clean up JSON golden tests for MemberUpdate

* Clean up JSON golden tests for MemberUpdate

* Clean up JSON golden tests for MutedStatus

* Clean up JSON golden tests for OtherMember

* Clean up JSON golden tests for ConvMembers

* Clean up JSON golden tests for OtherMemberUpdate

* Clean up JSON golden tests for RoleName

* Clean up JSON golden tests for Action

* Clean up JSON golden tests for ConversationRole

* Clean up JSON golden tests for ConversationRoleList

* Clean up JSON golden tests for TypingStatus

* Clean up JSON golden tests for TypingData

* Leaving JSON golden tests for CustomBackend

- The types CustomBackend is made of are not JSON-tested directly and it
looks like there is non-trivial logic as to what constitutes a valid
CustomBackend, so I'm leaving the tests as they are

* Clean up JSON golden tests for EventType

* Remove redundant JSON golden tests for conversation 'Event's

* Rename objects in JSON golden tests for conversation 'Event's

* Rename more objects in JSON golden tests for conversation 'Event's

* Add JSON golden tests for missing conversation event types

* Update the changelog

* Clean up JSON golden tests for SimpleMember

* Remove an unused contraint in a JSON test utility

* Remove unused imports in generated JSON golden tests

* Clean up JSON golden tests for SimpleMembers

* Clean up JSON golden tests for Member

* fixup! Clean up JSON golden tests for SimpleMembers

* Clean up JSON golden tests for Connect

* Clean up JSON golden tests for MemberUpdateData

* Clean up JSON golden tests for OtrMessage

* Clean up JSON golden tests for Priority

* Clean up JSON golden tests for OtrRecipients

* Remove unused imports in generated JSON golden tests

* Clean up JSON golden tests for NewOtrMessage

* Clean up JSON golden tests for ClientMismatch

* Clean up JSON golden tests for QueuedNotification

* Clean up JSON golden tests for QueuedNotificationList

* Leaving the PropertyKey tests as they are (missing better understanding)

- The only cosmetic change is to remove redundant brackets

* Clean up JSON golden tests for PropertyValue

* Clean up JSON golden tests for Wire.API.Push.Token.Transport

* Clean up JSON golden tests for Wire.API.Push.Token.Token

* Clean up JSON golden tests for AppName

* Clean up JSON golden tests for Wire.API.Push.Token.PushToken

* Clean up JSON golden tests for Wire.API.Push.Token.PushTokenList

* Update the changelog

* More conflict resolving after merging

* Remove unused imports and redundant brackets
  • Loading branch information
mdimjasevic committed Sep 7, 2021
1 parent 0f8196a commit 12dc909
Show file tree
Hide file tree
Showing 374 changed files with 283 additions and 17,512 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ THIS FILE ACCUMULATES THE RELEASE NOTES FOR THE UPCOMING RELEASE.
* Make mapping between (team) permissions and roles more lenient (#1711)
* The `DELETE /conversations/:cnv/members/:usr` endpoint rewritten to Servant (#1697)
* Remove leftover auto-connect internal endpoint and code (#1716)
* Clean up JSON golden tests (#1729, #1732)
* Clean up JSON golden tests (#1729, #1732, #1733)
* Make regenerated JSON output deterministic (#1734)
* Import fix for snappy linker issue (#1736)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"qualified_id": {
"id": "0000003a-0000-0042-0000-007500000037",
"domain": "faraway.example.com"
},
"id": "0000003a-0000-0042-0000-007500000036"
}
1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_10.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_11.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_12.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_13.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_14.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_15.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_16.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_17.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_18.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_19.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_2.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_20.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_3.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_4.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_5.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_6.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_7.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_8.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/wire-api/test/golden/testObject_AppName_user_9.json

This file was deleted.

37 changes: 3 additions & 34 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,15 @@
"00000005-0000-0000-0000-000600000008": [
"0",
"1"
],
"00000005-0000-0002-0000-000800000001": [
"3",
"4"
],
"00000005-0000-0006-0000-000400000001": []
]
},
"missing": {
"00000000-0000-0000-0000-000100000002": [
"0",
"1"
],
"00000000-0000-0000-0000-000200000000": [
"0"
],
"00000000-0000-0001-0000-000200000001": [
"2"
],
"00000000-0000-0001-0000-000200000002": [],
"00000001-0000-0000-0000-000000000000": [],
"00000001-0000-0000-0000-000100000002": [
"0",
"1"
],
"00000001-0000-0001-0000-000100000002": [
"0",
"1"
],
"00000001-0000-0002-0000-000200000000": [],
"00000001-0000-0002-0000-000200000001": [
"0"
],
"00000002-0000-0000-0000-000200000000": [
"0"
],
"00000002-0000-0001-0000-000200000002": []
},
"redundant": {
"00000009-0000-005e-0000-002e00000012": [],
"00000072-0000-0051-0000-000500000007": []
"00000000-0000-0000-0000-000200000000": []
},
"redundant": {},
"time": "1864-04-12T12:22:43.673Z"
}
36 changes: 0 additions & 36 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_10.json

This file was deleted.

52 changes: 0 additions & 52 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_11.json

This file was deleted.

46 changes: 0 additions & 46 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_12.json

This file was deleted.

66 changes: 0 additions & 66 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_13.json

This file was deleted.

41 changes: 0 additions & 41 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_14.json

This file was deleted.

41 changes: 0 additions & 41 deletions libs/wire-api/test/golden/testObject_ClientMismatch_user_15.json

This file was deleted.

0 comments on commit 12dc909

Please sign in to comment.