Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
prometheus-operator: Add conversion tests
Browse files Browse the repository at this point in the history
- This commit adds new conversion test case to verify if the
  `foldersFromFilesStructure` is put in the configmap correctly.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed Oct 16, 2020
1 parent 8f5a00e commit af5c28d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/components/prometheus-operator/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,23 @@ component "prometheus-operator" {
expected: "prometheus.mydomain.net",
jsonPath: "{.spec.rules[0].host}",
},
{
name: "verify foldersFromFilesStructure in configmap",
inputConfig: `component "prometheus-operator" {}`,
expectedManifestName: "prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml",
expected: `apiVersion: 1
providers:
- name: 'sidecarProvider'
orgId: 1
folder: ''
type: file
disableDeletion: false
allowUiUpdates: false
options:
foldersFromFilesStructure: true
path: /tmp/dashboards`,
jsonPath: "{.data.provider\\.yaml}",
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit af5c28d

Please sign in to comment.