This reverts commit 4acc4796ed.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3e4d91590f
Коммит
6d427cf005
@@ -322,10 +322,6 @@ func (m *Manifest) IsValid() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manifest) GetPluginID() string {
|
|
||||||
return m.Id
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *PluginSettingsSchema) isValid() error {
|
func (s *PluginSettingsSchema) isValid() error {
|
||||||
for _, setting := range s.Settings {
|
for _, setting := range s.Settings {
|
||||||
err := setting.isValid()
|
err := setting.isValid()
|
||||||
|
|||||||
@@ -81,29 +81,6 @@ func TestIsValid(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetPluginIdReturnsCorrectId(t *testing.T) {
|
|
||||||
testCases := []struct {
|
|
||||||
Title string
|
|
||||||
Id string
|
|
||||||
manifest *Manifest
|
|
||||||
ExpectEqual bool
|
|
||||||
}{
|
|
||||||
{"Ids are Different", "not-same.com.company.test", &Manifest{Id: "com.company.test"}, false},
|
|
||||||
{"Ids are the same", "com.company.test", &Manifest{Id: "com.company.test"}, true},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, tc := range testCases {
|
|
||||||
t.Run(tc.Title, func(t *testing.T) {
|
|
||||||
id := tc.manifest.GetPluginID()
|
|
||||||
if tc.ExpectEqual {
|
|
||||||
assert.Equal(t, tc.Id, id)
|
|
||||||
} else {
|
|
||||||
assert.NotEqual(t, tc.Id, id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestIsValidSettingsSchema(t *testing.T) {
|
func TestIsValidSettingsSchema(t *testing.T) {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
Title string
|
Title string
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user