mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 12:32:17 +08:00
Plugins: Standardize Golang enum naming convention (#69449)
* standardize enum pattern * fix up
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user