PLT-8131 (part2) Add plugin key value store support (#7902)

* Add plugin key value store support

* Add localization strings

* Updates per feedback
This commit is contained in:
Joram Wilander
2017-11-27 17:23:35 -05:00
committed by GitHub
parent e85ec38301
commit 6176bcff69
22 changed files with 888 additions and 230 deletions

View File

@@ -0,0 +1,22 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPluginKeyIsValid(t *testing.T) {
kv := PluginKeyValue{PluginId: "someid", Key: "somekey", Value: []byte("somevalue")}
assert.Nil(t, kv.IsValid())
kv.PluginId = ""
assert.NotNil(t, kv.IsValid())
kv.PluginId = "someid"
kv.Key = ""
assert.NotNil(t, kv.IsValid())
}