Skip to content

Commit

Permalink
Upgrade Grafana versions in tests
Browse files Browse the repository at this point in the history
Also, remove TODOs and run tests 10.4 tests on local instances when appropriate
  • Loading branch information
julienduchesne committed Mar 12, 2024
1 parent 156841e commit a8b1b7e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/acc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ jobs:
fail-fast: false # Let all versions run, even if one fails
matrix:
# OSS tests, run on all versions
version: ['10.3.1', '10.2.3', '9.5.15', '8.5.27']
version: ['10.4.0', '10.3.4', '9.5.17', '8.5.27']
type: ['oss']
subset: ['basic', 'other', 'long']
include:
- version: '10.3.1'
- version: '10.4.0'
type: 'oss'
subset: examples
# TLS proxy tests, run only on latest version
- version: '10.3.1'
- version: '10.4.0'
type: 'tls'
subset: 'basic'
# Sub-path tests. Runs tests on localhost:3000/grafana/
- version: '10.3.1'
- version: '10.4.0'
type: 'subpath'
subset: 'basic'
- version: '10.3.1'
- version: '10.4.0'
type: 'subpath'
subset: 'other'
# Enterprise tests, run only on latest version
- version: '10.3.1'
- version: '10.4.0'
type: 'enterprise'
subset: 'all'
name: ${{ matrix.version }} - ${{ matrix.type }} - ${{ matrix.subset }}
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GRAFANA_VERSION ?= 10.3.1
GRAFANA_VERSION ?= 10.4.0
DOCKER_COMPOSE_ARGS ?= --force-recreate --detach --remove-orphans --wait

testacc:
Expand Down
8 changes: 2 additions & 6 deletions internal/resources/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ func TestAccExamples(t *testing.T) {
{
category: "Alerting",
testCheck: func(t *testing.T, filename string) {
testutils.CheckOSSTestsEnabled(t, ">=10.2.0") // Only run on latest OSS version. The examples should be updated to reflect their latest working config.
testutils.CheckOSSTestsEnabled(t, ">=10.4.0") // Only run on latest OSS version. The examples should be updated to reflect their latest working config.
},
},
{
category: "Grafana OSS",
testCheck: func(t *testing.T, filename string) {
if strings.Contains(filename, "sso_settings") {
testutils.CheckCloudInstanceTestsEnabled(t) // TODO: Run on v10.4.0 once it's released
} else {
testutils.CheckOSSTestsEnabled(t, ">=10.2.0") // Only run on latest OSS version. The examples should be updated to reflect their latest working config.
}
testutils.CheckOSSTestsEnabled(t, ">=10.4.0") // Only run on latest OSS version. The examples should be updated to reflect their latest working config.
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func TestAccAlertRule_zeroSeconds(t *testing.T) {
}

func TestAccAlertRule_NotificationSettings(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t) // TODO: Run on v10.4.0 once it's released
testutils.CheckOSSTestsEnabled(t, ">=10.4.0")

var group models.AlertRuleGroup
var name = acctest.RandString(10)
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/grafana/resource_folder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestAccFolder_basic(t *testing.T) {
}

func TestAccFolder_nested(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t) // TODO: Switch to OSS once nested folders are enabled by default
testutils.CheckOSSTestsEnabled(t, ">=10.3.0")

var parentFolder models.Folder
var childFolder1 models.Folder
Expand Down
4 changes: 2 additions & 2 deletions internal/resources/grafana/resource_sso_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

func TestSSOSettings_basic(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t) // TODO: Run on v10.4.0 once it's released
testutils.CheckOSSTestsEnabled(t, ">=10.4.0")

providers := []string{"gitlab", "google", "generic_oauth", "azuread", "okta"}

Expand Down Expand Up @@ -65,7 +65,7 @@ func TestSSOSettings_basic(t *testing.T) {
}

func TestSSOSettings_customFields(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t) // TODO: Run on v10.4.0 once it's released
testutils.CheckOSSTestsEnabled(t, ">=10.4.0")

api := grafana.OAPIGlobalClient(testutils.Provider.Meta())

Expand Down

0 comments on commit a8b1b7e

Please sign in to comment.