larkox
d3c607f5c6
Fix error: Tests fail due to changes in MinIO default port ( #13108 )
...
Automatic Merge
2019-11-22 09:06:51 -05:00
Elias Nahum
3e9cd464de
MM-20347 Move ID Loaded Push Notifications to E20 ( #13185 )
...
* Move ID Loaded Push Notifications to E20
* Fix model tests
2019-11-21 19:35:19 -03:00
Martin Kraft
0212845385
MM-18356: Adds ability to paginate channel search. ( #12830 )
...
* MM-18356: Adds ability to paginate channel search.
* MM-18356: Minor refactor.
* MM-18356: Adds doc.
* MM-18356: Fixes doc.
* MM-18356: Some commentary, adds the total count to non-paginated responses, and removes a stray fmt.
* MM-18356: Fixes shadowed variable.
* MM-18356: Removes paginate field and API parameter.
* MM-18356: Adds method to check if channel search is a paginated request.
* MM-18356: Vet fix.
2019-11-19 11:38:49 -05:00
Harrison Healey
de913e7537
Merge branch 'master' into mark-as-unread
2019-11-19 09:45:03 -05:00
Ali Farooq
a6e992ae74
MM-16368 - Plugin Signing ( #13017 )
...
* [MM-18757] POST handler for `/plugins/marketplace` (#12372 )
* Implement installMarketplacePlugin
* Add InstallMarketplacePlugin endpoint
* Fix go.mod
* merge with master
* Fix go.mod
* Fix plugin tests
* Move get plugin to marketplace client
* Fix stylistic concerns
* Add trailing newline to the go.mod
* [MM-16586] Add plugin signature settings (#12390 )
* MM-17149 - Extend config.json for marketplace settings (#11933 )
* MM-17149 - Extend config.json for marketplace settings
* Renamed MarketplaceUrl, tracking default marketplace url
* Added EnableMarketplace to the client config
* Revert "Added EnableMarketplace to the client config"
This reverts commit 0f982c4c661c2cd9bb96264e9a01a2363c40d9c5.
* MM-17149 - Added EnableMarketplace to the client config (#11958 )
* Added EnableMarketplace to the client config
* Moved EnableMarketplace setting out of limited client configuration
* Add public key settings to the config.json
* Rename PublicKeys to SignaturePublicKeyFiles
* Change filepath.Split to Base
* Remove additional prints
* Force extention of a public key file
* Remove config validation
* Remove error on delete
* Remove config cloning
* Add error messages
* Add plugin public key tests
* Rename extension to PluginSignaturePublicKeyFileExtention
* Remove EnforceVerification
* Change []*PublicKeyDescription to []string
* Change .asc extension to .plugin.asc
* Change ordering of public methods
* Change plugin key commands
* Update examples in the plugin key commands
* Remove forcing extention
* Add verify signature in settings
* Fix tabbing
* Fix naming
* Remove unused text
* Remove unused text
* Update command examples
* Fix unit tests
* Change errors.New to errors.Wrap
* Fix verbose flag
* Change .asc to .gpg
* Fix }
* Change AddPublicKey signature
* Change public.key extension
* Add plugin public key command tests
* Update en.json
* Bootstrap the public keys
* Update en.json
* Fix en.json
* Fix en.json
* Bootstrap hard-coded public key
* Remove unused texts in en.json
* Change file to name
* Add license header
* Update development public key
* Remove writeFile method
* Remove .plugin.asc extension
* Rename publiKey to mattermostPublicKey
* Remove init_public_keys string
* GolangCI
* Closing file handlers
* Fixed test that was installing nps plugin
* [MM-19798] Implement plugin signature verification (#12768 )
* MM-17149 - Extend config.json for marketplace settings (#11933 )
* MM-17149 - Extend config.json for marketplace settings
* Renamed MarketplaceUrl, tracking default marketplace url
* Added EnableMarketplace to the client config
* Revert "Added EnableMarketplace to the client config"
This reverts commit 0f982c4c661c2cd9bb96264e9a01a2363c40d9c5.
* MM-17149 - Added EnableMarketplace to the client config (#11958 )
* Added EnableMarketplace to the client config
* Moved EnableMarketplace setting out of limited client configuration
* Add public key settings to the config.json
* Rename PublicKeys to SignaturePublicKeyFiles
* Change filepath.Split to Base
* Remove additional prints
* Force extention of a public key file
* Remove config validation
* Remove error on delete
* Remove config cloning
* Add error messages
* Add plugin public key tests
* Rename extension to PluginSignaturePublicKeyFileExtention
* Remove EnforceVerification
* Change []*PublicKeyDescription to []string
* Change .asc extension to .plugin.asc
* Change ordering of public methods
* Change plugin key commands
* Update examples in the plugin key commands
* Remove forcing extention
* Add verify signature in settings
* Fix tabbing
* Fix naming
* Remove unused text
* Remove unused text
* Update command examples
* Fix unit tests
* Change errors.New to errors.Wrap
* Fix verbose flag
* Change .asc to .gpg
* Fix }
* Change AddPublicKey signature
* Change public.key extension
* Add plugin public key command tests
* Update en.json
* Bootstrap the public keys
* Update en.json
* Fix en.json
* Fix en.json
* Bootstrap hard-coded public key
* Remove unused texts in en.json
* Change file to name
* Add license header
* Implement plugin signature verification
* Remove benburker openpgp
* Update en.json
* Update development public key
* Add support of multiple signatures in filestore
* Update en.json
* Run go mod vendor
* Fix style
* Remove writeFile method
* Remove .plugin.asc extension
* Rename publiKey to mattermostPublicKey
* Verify plugin with mattermost public key
* Remove init_public_keys string
* Add InstallPluginWithSignature method and Refactor
* Add signature verification on claster notification
* Remove armored signature headers
* Add error strings
* Fix en.json
* Change signatureStorePath
* Implement minor fixes
* Refactor plugin install methods
* Add installPlugin method to uploadPlugin
* Update en.json
* Refactor installPlugin
* Limit number of signatures
* Close signatures
* Fix helper function
* Fix fromReadCloseSeekerToReadSeeker
* Cleaned up ReadCloseSeeker for signatures
* Remove signature truncation on FS
* GolangCI
* Add tests for armored signatures and plugin uploads
* Fix nil slice issue
* Fix TestPluginSync
* Fixed tests
* Return io.ReadSeeker from downloadFromUrl
* Add log for the found plugins in the file store
* Remove logging plugin detection info
* [MM-20134] Consume and store single-signature for each plugin (#13081 )
* Consume and store single-signature for each plugin
* Fix en.json
* Remove saveSignature method
* Remove public key hash
* PR Feedback
* refactored config
* PR feedback
2019-11-18 19:02:41 -05:00
Miguel Alatzar
d44d563ef3
[MM-16232] ID loaded push notifications ( #13137 )
...
* Update BuildPushNotificationMessage (#12974 )
* Update BuildPushNotificationMessage
* Included Category, Version, and Type
* Remove unnecessary function args
* [MM-16232] Build and return fetched notification (#13085 )
* Build and return fetched notification
* Remove check on PushNotificationContents
* Ran i18n-extract
* Get UserId from session
* Re-add ReturnStatusOK
* Remove UserId from PushNotificationAck
* Always include channel name
* [MM-16232] Return after writing response and add default message (#13127 )
* Return after writing response and add default message
* Include channel ID as well
* Localize default message
* Fix i18n
2019-11-18 15:42:51 -08:00
Jesse Hallam
2571d97723
MM-18517: Plugin Marketplace (Phase 2) ( #13086 )
...
* MM-17549: use StatusNotFound when deleting plugin (#12983 )
Trying to delete a plugin that does not exist should fail with a 404, not a 400.
Relates-to: https://mattermost.atlassian.net/browse/MM-17549
* MM-19630: marketplace: model ReleaseNotesURL (#13083 )
Automatic Merge
* MM-20065: allow prepackaged plugin upgrade (#13076 )
* MM-20065: allow prepackaged plugin upgrade
When locally installing prepackaged plugins, skip if a plugin exists with the same id and is the same or a newer version.
This is effectively a "poor man's" rework of prepackaged plugins to allow upgrade of prepackaged plugins via the marketplace. The larger plan to rework prepackaged plugins was deferred from v5.18.
Fixes: https://mattermost.atlassian.net/browse/MM-20065
* eliminate unnecessary installPlugin
* fix TestPluginSync defaults to match minio
* cleanExistingBundles
* close prepackaged filereader
* simplify
2019-11-18 13:40:49 -04:00
Luke Kingland
8c22455d41
reaction_test: use testify require for fatal errors ( #12951 )
2019-11-18 11:40:09 +01:00
Jesús Espino
7031f51b41
Deactivating and invalidating sessions of guest users on guest disable ( #13007 )
...
Automatic Merge
2019-11-15 09:43:52 -05:00
Claudio Costa
6a75d2fc68
[MM-15270] Add Team.InviteId sanitization ( #12952 )
...
* Filter out InviteId in Team sanitize function
* Keep InviteId for authorized users
* Update team sanitization tests
* Improve tests and revert conflicting lines
2019-11-15 15:40:41 +01:00
Vinício Augusto
10e1fa4382
Migrate tests from "api4/user_test.go" to use testify ( #12967 )
...
* testify in api4/user_test.go
* more semantic treatments for require.Nil
* fix err shadowing
* gofmt
* trying to pass require.NoError problems
* trying to pass more require.NoError problems
2019-11-15 09:13:32 -05:00
Hossein Ahmadian-Yazdi
1ed1a6be0b
[MM-19740] Return error for non-system-admins/team admins/channel admins from the GET /api/v4/groups API endpoint response ( #12961 )
...
* [MM-19740] Differentiate between admin and non-admin
* [MM-19740] added testing admin and non admin
* [MM-19740] Address PR comments
* [MM-19740] Addressed PR comments
* [MM-19740] Updated en.json
* [MM-19740] Addressed PR comments
* Address PR comments
* Address PR comments
2019-11-14 09:21:23 -05:00
Luke Kingland
f6f7a65659
commands_test: use testify ( #12950 )
2019-11-13 22:51:41 +01:00
Harrison Healey
3f99923ed4
Merge branch 'master' into mark-as-unread
2019-11-13 15:33:47 -05:00
Luke Kingland
988b8b74c5
channel_test: use testify ( #12938 )
...
Automatic Merge
2019-11-13 13:53:57 -05:00
Harrison Healey
df7cbcb440
Merge branch 'master' into mark-as-unread
2019-11-12 14:20:50 -05:00
Shobhit Gupta
111d076a86
Migrate tests from "api4/team_test.go" to use testify ( #12902 )
2019-11-12 12:43:10 +01:00
Valentijn Nieman
36f3b14420
MM-19337 Enable users to view archived channels ( #12995 )
...
* First pass at searching archived channels
* Create endpoint for archived channels
* Update test for GetPublicChannelsForTeam
* Fix unit test for archived channels
* Rename includeDeleted to onlyDeleted
* Remove new /archived endpoint in favour of existing /deleted endpoint
* Fix broken test
* Remove manage team permission from /deleted endpoint
* Fix deletedChannels test
* Test for searching archived channels
* Only return private deleted channels user was a member of
* SearchArchivedChannels also searches private channels (user is a member of)
* Remove for loop to simplify append
* Remove userId from Client4 searcArchivedChannels
2019-11-12 06:15:19 +08:00
Scott Bishel
e07e114def
don't clear AuthService/AuthData if user is System Admin ( #12986 )
2019-11-07 12:12:37 -07:00
Harrison Healey
6e6174a9ee
Merge branch 'master' into mark-as-unread
2019-11-07 10:58:09 -05:00
Akshay Chhajed
5b89cdcb6b
GH-12888 Modify api4/config_test.go to use testify ( #12946 )
2019-11-06 20:51:30 +01:00
Harrison Healey
47409aaa4b
Merge branch 'master' into mark-as-unread
2019-11-04 15:04:28 -05:00
Daniel Schalla
501da809f3
[CR-458] Enhance Logs Endpoint Message ( #12984 )
...
* Make it possible to identify log entries created via the post API endpoints
* Clarify wording
2019-11-04 10:03:59 -08:00
Ben Schumacher
812c40a307
Adjust govet settings and fix issues found by it ( #12947 )
2019-11-04 13:47:59 +01:00
Adarsh K Kumar
cacdda702e
MM-19663 | Migrate brand_test and cluster_test to testify ( #12935 )
...
* MM-19663 | Migrate brand_test and cluster_test to testify
* Use require.Fail instead of require.FailNow
Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com >
2019-11-03 17:13:22 +02:00
Ben Schumacher
a2adf7b3f5
Run unused against codebase ( #12968 )
...
* Remove unused methods
* Fix missed issues
2019-11-01 23:08:01 +01:00
Harrison Healey
fa34be4aa0
Merge branch 'master' into mark-as-unread
2019-10-31 09:15:41 -04:00
Claudio Costa
422f377c96
[MM-19473] Fix data race on user login ( #12870 )
...
* Avoid writes to App.Session outside the app layer
* Fix merge
* Remove unneeded else condition
2019-10-31 12:50:43 +01:00
Luke Kingland
6f6eb13a47
license, openGraph tests: convert to testify ( #12919 )
2019-10-31 12:19:19 +01:00
Luke Kingland
8c3dcadbd7
oauth_test: use testify ( #12949 )
...
* oauth_test: use testify
* oauth_test: use assert in most cases, correct param order
2019-10-31 10:47:51 +01:00
Luke Kingland
df0bb8aaa0
emoji_test: update to use testify ( #12932 )
...
* emoji_test: update to use testify
* emoji_test: use testify builtin Len check, and add missing err check
2019-10-31 12:44:27 +04:00
Romain FOYARD
4111ffdb4d
Include extra metadata when clicking an interactive button ( #12697 )
...
* Include user_name, team_domain and channel_name when clicking an interactive button
* Fixed api4's TestPostActionCookies test
* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.
* Further optimizations to database requests
* Removed useless goroutine when fetching channel
2019-10-30 10:36:14 -07:00
Luciano Magro Mores
f9a7a16a78
Convert api4/webhook_test.go t.Fatal calls into require/assert calls ( #12904 )
2019-10-30 21:08:40 +08:00
Harrison Healey
eb36329e8d
Merge branch 'master' into mark-as-unread
2019-10-29 10:11:41 -04:00
Ben Schumacher
38c0bde7f8
Run ineffassign against codebase ( #12925 )
2019-10-29 15:04:28 +01:00
Ali Farooq
4cc2973483
MM-18827 - Can not use api/v4/websocket with trailing slash ( #12931 )
2019-10-29 18:44:32 +08:00
Ben Schumacher
7a665aacdd
Run gosimple against codebase ( #12928 )
2019-10-29 07:45:09 +01:00
Ben Schumacher
fdcda20fe4
Cleanup dead code ( #12929 )
...
* Cleanup dead code
* Remove unneeded translation string
2019-10-28 19:12:50 +01:00
Luke Kingland
aaf0bf1cdd
command_help_test, cors_test: use testify ( #12941 )
...
* command_help_test, cors_test: use testify
* cors_test: remove extraneous lines
* command_help_test: remove extraneous lines
* command_help_test: set checks to nonterminal
2019-10-28 09:52:51 -06:00
Ben Schumacher
d6f8ea293b
Remove unused variables ( #12926 )
2019-10-28 11:41:41 -04:00
Ben Schumacher
e61340c54e
Run gofmt -s against codebase ( #12943 )
2019-10-28 06:08:08 -07:00
Ben Schumacher
8a72ed2833
Fix unnecessary type conversions ( #12927 )
2019-10-28 10:57:21 +01:00
Agus Mistiawan
3701a393e5
Migrate tests from "api4/apitestlib.go" to use testify ( #12817 )
...
* migrate tests to use testify
* check resp error
* require empty auth
* fix based on comment
* change to require
* change all assert to require
* remove line
2019-10-27 12:54:19 +01:00
Igor Zibarev
4d962aaade
Migrate tests from "api4/job_test.go" to use testify ( #12897 )
...
Fixes #12887
2019-10-27 11:47:15 +01:00
Luke Kingland
78c2780bc7
preference_test: use testify ( #12933 )
2019-10-26 07:38:07 -07:00
Rajat Varyani
7cf7e7f238
[MM-18871] Update session in app instance in app layer ( #12540 )
2019-10-25 14:13:13 +05:30
Laura Pareja
4f8fd3e59e
migrate tests from api4/status_test.go to testify ( #12906 )
2019-10-24 16:59:18 +02:00
Simon
caeadbec88
MM-19468 Migrate tests from "api4/command_test.go" to use testify ( #12809 )
...
* MM-19468 Migrate tests from "api4/command_test.go" to use testify
* swap expected and actual values during token regeneration test
2019-10-24 09:32:31 -04:00
Shobhit Gupta
cedaee99b8
Migrate tests from "api4/websocket_test.go" to use testify ( #12896 )
...
* Migrate tests to use testify
* Fix build
* Fix tests
2019-10-24 09:04:06 -04:00
Maurício Linhares
23aa193f28
Changes tests to use testify.require at api4/file_test.go fixe… ( #12814 )
2019-10-23 14:45:15 +02:00