feat: dashboards would work with grafana 10.x.x #2713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Task to be completed with this PR
prometheus
forceImport
CLI option implementation to force importGrafana test cases covered.
1. No datasource in grafana
a. normal cli -> fail
b. normal cli with force -> pass dashboards empty and not populating data as absense of datasource
c. normal cli with datasource -> fail
2. default datasource in grafana(prometheus)
a. normal cli -> pass, working in grafana
b. normal cli with other datasource -> fail
c. normal cli with other datasource Prometheus (caps)-> pass, working in grafana
3. other datasource in grafana
a. normal cli -> fail
b. normal cli with force -> pass but dashboard breaks as no matching datasource
c. normal cli with other datasource -> fail
d. normal cli with proper datasource with previous dashboards existed -> pass, but fail for overwrite as expected.
e. deleted previous dashboards, normal cli with proper datasource -> pass, dashboards working as expected.
4 legacy datasource name(Prometheus) exist in grafana
a. normal cli -> pass, working as expected in grafana
b. normal cli with datasource as Prometheus -> pass, working as expected