mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Respect HomepageURL in manifest for local plugins (#13595)
* Respect HomepageURL in manifest for local plugins * Add documentation for updating the plugin signatures
This commit is contained in:
@@ -604,7 +604,7 @@ func TestGetInstalledMarketplacePlugins(t *testing.T) {
|
||||
|
||||
expectedPlugins := append(samplePlugins, &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
HomepageURL: "",
|
||||
HomepageURL: "https://example.com/homepage",
|
||||
IconData: "",
|
||||
DownloadURL: "",
|
||||
Labels: []model.MarketplaceLabel{{
|
||||
@@ -739,7 +739,7 @@ func TestSearchGetMarketplacePlugins(t *testing.T) {
|
||||
|
||||
plugin1 := &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
HomepageURL: "",
|
||||
HomepageURL: "https://example.com/homepage",
|
||||
IconData: "",
|
||||
DownloadURL: "",
|
||||
Labels: []model.MarketplaceLabel{{
|
||||
@@ -756,7 +756,7 @@ func TestSearchGetMarketplacePlugins(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
plugin2 := &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
HomepageURL: "",
|
||||
HomepageURL: "https://example.com/homepage2",
|
||||
IconData: "",
|
||||
DownloadURL: "",
|
||||
Labels: []model.MarketplaceLabel{{
|
||||
@@ -898,7 +898,8 @@ func TestGetLocalPluginInMarketplace(t *testing.T) {
|
||||
|
||||
newPlugin := &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
Manifest: manifest,
|
||||
HomepageURL: "https://example.com/homepage",
|
||||
Manifest: manifest,
|
||||
},
|
||||
InstalledVersion: manifest.Version,
|
||||
}
|
||||
@@ -931,7 +932,8 @@ func TestGetLocalPluginInMarketplace(t *testing.T) {
|
||||
|
||||
newPlugin := &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
Manifest: manifest,
|
||||
HomepageURL: "https://example.com/homepage",
|
||||
Manifest: manifest,
|
||||
Labels: []model.MarketplaceLabel{{
|
||||
Name: "Local",
|
||||
Description: "This plugin is not listed in the marketplace",
|
||||
|
||||
@@ -598,8 +598,9 @@ func (a *App) mergeLocalPlugins(remoteMarketplacePlugins map[string]*model.Marke
|
||||
|
||||
remoteMarketplacePlugins[plugin.Manifest.Id] = &model.MarketplacePlugin{
|
||||
BaseMarketplacePlugin: &model.BaseMarketplacePlugin{
|
||||
Labels: labels,
|
||||
Manifest: plugin.Manifest,
|
||||
HomepageURL: plugin.Manifest.HomepageURL,
|
||||
Labels: labels,
|
||||
Manifest: plugin.Manifest,
|
||||
},
|
||||
InstalledVersion: plugin.Manifest.Version,
|
||||
}
|
||||
|
||||
@@ -16,3 +16,23 @@ In the text input box in Mattermost, type: `/test url [file-name-in-testing-fold
|
||||
|
||||
## 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 it’s 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.
|
||||
|
||||
## Test plugins
|
||||
|
||||
There are two test plugins: `testplugin.tar.gz` and `testplugin2.tar.gz`. These are use in some integration tests in the `api4` package. Any changes to the plugin bundles require updating the coresponding signatures.
|
||||
|
||||
First, import the public and privat development key:
|
||||
```
|
||||
$ gpg --import ./development-public-key.gpg
|
||||
$ gpg --import ./development-private-key.asc
|
||||
```
|
||||
|
||||
This has to be done only once.
|
||||
|
||||
Then update the sigantures:
|
||||
```
|
||||
$ gpg -u F3FACE45E0DE642C8BD6A8E64C7C6562C192CC1F --verbose --personal-digest-preferences SHA256 --detach-sign testplugin.tar.gz
|
||||
$ gpg -u F3FACE45E0DE642C8BD6A8E64C7C6562C192CC1F --verbose --personal-digest-preferences SHA256 --detach-sign --armor testplugin.tar.gz
|
||||
$ gpg -u F3FACE45E0DE642C8BD6A8E64C7C6562C192CC1F --verbose --personal-digest-preferences SHA256 --detach-sign testplugin2.tar.gz
|
||||
|
||||
Finally, include the updates bundles and signatures in your commit.
|
||||
|
||||
Binary file not shown.
@@ -1,15 +1,14 @@
|
||||
-----BEGIN PGP ARMORED FILE-----
|
||||
Comment: Use "gpg --dearmor" for unpacking
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQGzBAABCAAdFiEE8/rOReDeZCyL1qjmTHxlYsGSzB8FAl3vHFQACgkQTHxlYsGS
|
||||
zB933gv5AcDL/MW5/fwsLnhWW9plSCbRTMOckt94r0ASOKRzPP7ngEzGtkCFEIGQ
|
||||
bN/T60s9uADuIRHEFhmtZvG2MOg9Z688BxiDpyyTx7ENZH0zzPnULEg5hqf7DJqK
|
||||
Q8IdPSNE4wk4gvJLdrYIYUkQT4TkQonmBbIHvj3wWKaXTheDnUNp90pOiTszKubK
|
||||
ghpAj6ZAlRK60HuMMF7v0RIhqLKYKUGUWvzClKEUZlAKlqTK++FTM0Zot/7KTLDz
|
||||
KEv8gf6xe4oL7vSQBoZDa3Vvcn6tPF0gvwg2DrITT3MG2Rmgpbc74iUXWqoZ+XQp
|
||||
zf1P+vxbfbyKMYZ4tERlKfwnl6Dbz5vBvlz/U+ZYBmwuw4wD2DvdrecPHj1KcBNy
|
||||
2Auap8qhMQcZvYV7D/qnYL8/QU4roQdg4z+G/S0vQTlK5izpzY+/M8ofZHtjDdWD
|
||||
cD3w1cvwBFKn9EBJ1HA4/7FEHUzFrh/kWRw2PpUjkydCur2rHqecpRXBqS+Haz7J
|
||||
OT9k54ab
|
||||
=ywEK
|
||||
-----END PGP ARMORED FILE-----
|
||||
iQGzBAABCAAdFiEE8/rOReDeZCyL1qjmTHxlYsGSzB8FAl4hYxIACgkQTHxlYsGS
|
||||
zB97wwwAqI1gZQsOg6zsKIPCJ6kQ721rG5EaI/eDseRbKnxaFdcoe2+QzqDXE0Ax
|
||||
P5RhZBKr+5hcS4msxjKPPMAVUZeMrhM7pYFV7y1zSkYQkyk8bcfspL3bVbAT4lXA
|
||||
x2u2HN6zQqajmX5231hM60ScyIaQXE4aAyruJs4Jw0Cky+NWbXlmo+VVacRxjjp4
|
||||
eAodiF+WNuQb0+72qdrvaP/X6PVi/eKe3uv/fWGOKeQUb7yV8WBOcXbyhA7qHY9F
|
||||
n2utzLXyu34UBKlkUA7T/RQvFFJCzZAoctR3oN0lPOVdRzRIw0T1WqSxRNbnRgW4
|
||||
YPJdKvED7M68HFpdK37SBiMDivseU9I9vOfHRoaQlCK8CYTs1qHPx2hrivj7s5qN
|
||||
DStkmzcx1C6OwDt93my3M7WdUHeQ96ryXxFpS9Fj6vYdNTgOE03CW1WIPoNxXJme
|
||||
FHu5o9DNr0bNcsye8TNWqoemmM6NlAEdk239NoODwMwtoTia2eufmfMqkgeH8kR8
|
||||
BNCgEYSq
|
||||
=8YEF
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user