Skip to content

Commit

Permalink
Revert "Added GetPluginID method and tests (#27281)" (#27540)
Browse files Browse the repository at this point in the history
This reverts commit 4acc479.
  • Loading branch information
hanzei authored Jul 4, 2024
1 parent 3e4d915 commit 6d427cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
4 changes: 0 additions & 4 deletions server/public/model/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,6 @@ func (m *Manifest) IsValid() error {
return nil
}

func (m *Manifest) GetPluginID() string {
return m.Id
}

func (s *PluginSettingsSchema) isValid() error {
for _, setting := range s.Settings {
err := setting.isValid()
Expand Down
23 changes: 0 additions & 23 deletions server/public/model/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
testCases := []struct {
Title string
Expand Down

0 comments on commit 6d427cf

Please sign in to comment.