Add test coverage for dashboard prefix

This commit is contained in:
Pieter Noordhuis 2024-10-21 10:10:14 +02:00
parent ba182c4f84
commit c1e4360214
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,9 @@ func mockBundle(mode config.Mode) *bundle.Bundle {
Clusters: map[string]*resources.Cluster{
"cluster1": {ClusterSpec: &compute.ClusterSpec{ClusterName: "cluster1", SparkVersion: "13.2.x", NumWorkers: 1}},
},
Dashboards: map[string]*resources.Dashboard{
"dashboard1": {DisplayName: "dashboard1"},
},
},
},
// Use AWS implementation for testing.
@ -184,6 +187,9 @@ func TestProcessTargetModeDevelopment(t *testing.T) {
// Clusters
assert.Equal(t, "[dev lennart] cluster1", b.Config.Resources.Clusters["cluster1"].ClusterName)
// Dashboards
assert.Equal(t, "[dev lennart] dashboard1", b.Config.Resources.Dashboards["dashboard1"].DisplayName)
}
func TestProcessTargetModeDevelopmentTagNormalizationForAws(t *testing.T) {