Plugins: Standardize Golang enum naming convention (#69449)

* standardize enum pattern

* fix up
This commit is contained in:
Will Browne
2023-06-08 12:21:19 +02:00
committed by GitHub
parent 4db6679460
commit a221e1d226
31 changed files with 308 additions and 306 deletions

View File

@ -28,7 +28,7 @@ func Test_ReadPluginJSON(t *testing.T) {
},
expected: JSONData{
ID: "test-app",
Type: "app",
Type: TypeApp,
Name: "Test App",
Info: Info{
Author: InfoLink{
@ -91,7 +91,7 @@ func Test_ReadPluginJSON(t *testing.T) {
},
expected: JSONData{
ID: "grafana-piechart-panel",
Type: "panel",
Type: TypePanel,
Name: "Pie Chart (old)",
Dependencies: Dependencies{
GrafanaVersion: "*",
@ -114,7 +114,7 @@ func Test_ReadPluginJSON(t *testing.T) {
expected: JSONData{
ID: "grafana-pyroscope-datasource",
Alias: "phlare", // Hardcoded from the parser
Type: "datasource",
Type: TypeDataSource,
Dependencies: Dependencies{
GrafanaDependency: "",
GrafanaVersion: "*",
@ -153,7 +153,7 @@ func Test_validatePluginJSON(t *testing.T) {
args: args{
data: JSONData{
ID: "grafana-plugin-id",
Type: DataSource,
Type: TypeDataSource,
},
},
},
@ -161,7 +161,7 @@ func Test_validatePluginJSON(t *testing.T) {
name: "Invalid plugin ID",
args: args{
data: JSONData{
Type: Panel,
Type: TypePanel,
},
},
err: ErrInvalidPluginJSON,