mattermost/tests
Shota Gvinepadze d498c9de00 [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 0f982c4c66.

* 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
2019-11-01 18:59:08 -04:00
..
development-public-key.asc [MM-19798] Implement plugin signature verification (#12768) 2019-11-01 18:59:08 -04:00
development-public-key.gpg [MM-19798] Implement plugin signature verification (#12768) 2019-11-01 18:59:08 -04:00
Fake_Team_Import.zip [APIV4] POST /teams/{team_id}/import for apiv4 (#5920) 2017-04-03 17:38:26 +01:00
orientation_test.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_1.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_1_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_1_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_2.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_2_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_2_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_3.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_3_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_3_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_4.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_4_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_4_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_5.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_5_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_5_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_6.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_6_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_6_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_7.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_7_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_7_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_8.jpeg MM-7633: Optimize memory utilization during file uploads (#9835) 2018-12-13 22:32:07 +01:00
orientation_test_8_expected_preview.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
orientation_test_8_expected_thumb.jpeg MM-16997: Simplified TestUploadFiles (#11707) 2019-07-26 09:54:04 -07:00
qa-data-graph.png Ldap groups phase1 (#9752) 2019-01-10 15:17:31 -05:00
qa-data.ldif Ldap groups phase1 (#9752) 2019-01-10 15:17:31 -05:00
README.md Fix places where we still refer to "/loadtest" (#6732) 2017-06-23 13:36:13 -04:00
slack-import-test-channels.json Slack import unit tests (#4201) 2016-10-12 10:03:30 -04:00
slack-import-test-direct-messages.json Add Slack corporate import ability (#10905) 2019-06-04 17:11:29 -04:00
slack-import-test-group-direct-messages.json Add Slack corporate import ability (#10905) 2019-06-04 17:11:29 -04:00
slack-import-test-posts.json add support for new slack post format and multiple attachments in slack importer (#11415) 2019-07-11 10:47:51 +01:00
slack-import-test-private-channels.json Add Slack corporate import ability (#10905) 2019-06-04 17:11:29 -04:00
slack-import-test-users.json Slack import unit tests (#4201) 2016-10-12 10:03:30 -04:00
test-attachments.md Updated to Google Drive location (#7856) 2017-11-20 12:36:19 -08:00
test-config.json MM-17767: Remove ExperimentalLdapGroupSync config. (#12388) 2019-10-08 08:03:39 -04:00
test-data-graph.png Ldap groups phase1 (#9752) 2019-01-10 15:17:31 -05:00
test-data.ldif MM-14412: Enables force removals of team/channel members base on group constraints. (#10490) 2019-04-02 09:22:50 -04:00
test-emoticons1.md PLT-7356 and 7378 Reduce size of emoji test posts (#7291) 2017-08-25 10:43:06 -04:00
test-emoticons2.md Remove duplicate Nature section (#7571) 2017-10-04 12:01:26 -07:00
test-emoticons3.md PLT-7356 and 7378 Reduce size of emoji test posts (#7291) 2017-08-25 10:43:06 -04:00
test-emoticons4.md PLT-7356 and 7378 Reduce size of emoji test posts (#7291) 2017-08-25 10:43:06 -04:00
test-emoticons5.md PLT-7356 and 7378 Reduce size of emoji test posts (#7291) 2017-08-25 10:43:06 -04:00
test-emoticons6.md PLT-7356 and 7378 Reduce size of emoji test posts (#7291) 2017-08-25 10:43:06 -04:00
test-hashtags.md Moving tests to /tests and removing /doc folder. Docs are now in seperate repository 2016-02-18 09:25:10 -05:00
test-link-preview.md Update link preview test cases (#5620) 2017-03-04 17:49:46 +00:00
test-links.md PLT-6813 Removed misleading and outdated link tests (#6767) 2017-06-28 07:27:32 -07:00
test-markdown-basics.md Update test-markdown-basics.md (#5657) 2017-03-06 20:37:14 -05:00
test-markdown-lists.md Update markdown test for lists (#6131) 2017-04-18 08:26:25 -07:00
test-mentions.md Moving tests to /tests and removing /doc folder. Docs are now in seperate repository 2016-02-18 09:25:10 -05:00
test-public-key.plugin.gpg [MM-16586] Add plugin signature settings (#12390) 2019-10-31 18:15:10 -04:00
test-search.md Add special characters hashtag tests (#6132) 2017-04-18 11:05:31 +01:00
test-slack-attachments.json Fix parsing attachment field links into markdown (#2958) (#2959) 2016-05-12 08:30:44 -04:00
test-syntax-highlighting.md Remove old tests from syntax-highlighting.md (#2970) 2016-05-12 07:45:31 -04:00
test-tables.md Update test-tables.md (#6775) 2017-06-28 09:37:43 -04:00
test.png Converting to Webpack. Stage 1. 2016-03-16 18:02:55 -04:00
test.svg MM-15452 - Add ability to override LHS icon for bot accounts (#11423) 2019-07-06 08:56:21 +02:00
test.tiff [MM-8421] Fix tiff preview - backend (#10170) 2019-02-21 09:06:59 +01:00
test_expected_preview.tiff [MM-8421] Fix tiff preview - backend (#10170) 2019-02-21 09:06:59 +01:00
test_expected_thumb.tiff [MM-8421] Fix tiff preview - backend (#10170) 2019-02-21 09:06:59 +01:00
testgif.gif Converting to Webpack. Stage 1. 2016-03-16 18:02:55 -04:00
testplugin.tar.gz MM-10702 Moving plugins to use hashicorp go-plugin. (#8978) 2018-06-25 12:33:13 -07:00
testplugin.tar.gz.asc [MM-19798] Implement plugin signature verification (#12768) 2019-11-01 18:59:08 -04:00
testplugin.tar.gz.sig [MM-19798] Implement plugin signature verification (#12768) 2019-11-01 18:59:08 -04:00
testpluginv2.tar.gz [MM-16586] Add plugin signature settings (#12390) 2019-10-31 18:15:10 -04:00
testpluginv2.tar.gz.sig [MM-19798] Implement plugin signature verification (#12768) 2019-11-01 18:59:08 -04:00
tls_test_cert.pem Set default ciphers, set tls 1.2 via config, set curve prefs (#9315) 2018-10-16 07:51:46 -07:00
tls_test_key.pem Set default ciphers, set tls 1.2 via config, set curve prefs (#9315) 2018-10-16 07:51:46 -07:00

Testing Text Processing

The text processing tests located in the doc/developer/tests folder are designed for use with the /test url command. This command posts the raw contents of a specified .md file in the doc/developer/test folder into Mattermost.

Turning on /test

Access the System Console from the Main Menu. Under Service Settings make sure that Enable Testing is set to true, then click Save. You may also change this setting from config.json by setting ”EnableTesting”: true. Changing this setting requires a server restart to take effect.

Running the Tests

In the text input box in Mattermost, type: /test url [file-name-in-testing-folder].md. Some examples:

/test url test-emoticons.md
/test url test-links.md

Notes:

  1. If a test has prerequisites, make sure your Mattermost setup meets the requirements described at the top of the test file.
  2. Some tests are over 4000 characters in length and will render across multiple posts.

Manual Testing

It is possible to manually test specific sections of any test, instead of using the /test command. Do this by clicking Raw in the header for the file when its open in GitHub, then copy and paste any section into Mattermost to post it. Manual testing only supports sections of 4000 characters or less per post.