From 72d5c1b01659f41923800c59c391caed4c25a8ba Mon Sep 17 00:00:00 2001 From: rrey Date: Sun, 13 Oct 2024 01:30:04 +0000 Subject: [PATCH 1/3] Update tested Grafana versions --- .github/workflows/ansible-test.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 9c660b35..5cefb2dd 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - grafana_version: ["11.2.0", "10.4.8", "9.5.20"] + grafana_version: ["11.2.2", "10.4.10", "9.5.20"] ansible_version: ["stable-2.15", "stable-2.16", "devel"] python_version: ["3.11"] services: @@ -67,7 +67,7 @@ jobs: strategy: fail-fast: false matrix: - grafana_version: ["11.2.0", "10.4.8", "9.5.20"] + grafana_version: ["11.2.2", "10.4.10", "9.5.20"] ansible_version: ["stable-2.15", "stable-2.16", "devel"] python_version: ["3.11"] services: diff --git a/README.md b/README.md index bffea6ea..bcfa9dbe 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Click on the name of a plugin or module to view that content's documentation: We aim at keeping the last 3 Major versions of Grafana tested. This collection is currently testing the modules against following versions of Grafana: ``` -grafana_version: ["11.2.0", "10.4.8", "9.5.20"] +grafana_version: ["11.2.2", "10.4.10", "9.5.20"] ``` ## Installation and Usage From 157b1cb1a38207d0b9b1b53d66ab7beb029fe1e2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 29 Oct 2024 10:38:05 +0000 Subject: [PATCH 2/3] test: replace more deprecated assertEquals `TestCase.assertEquals` was deprecated and removed in Python 3.12. Similar to #350, but for code that was added later. --- changelogs/fragments/406-python3.12.yml | 3 +++ .../modules/grafana/grafana_silence/test_grafana_silence.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/406-python3.12.yml diff --git a/changelogs/fragments/406-python3.12.yml b/changelogs/fragments/406-python3.12.yml new file mode 100644 index 00000000..376cc7a1 --- /dev/null +++ b/changelogs/fragments/406-python3.12.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - "test: replace more deprecated `TestCase.assertEquals` to support Python 3.12" diff --git a/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py b/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py index c2bb1df3..6ce81624 100644 --- a/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py +++ b/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py @@ -162,7 +162,7 @@ def test_create_silence_new_silence( }, method="POST", ) - self.assertEquals(result, {"silenceID": "470b7116-8f06-4bb6-9e6c-6258aa92218e"}) + self.assertEqual(result, {"silenceID": "470b7116-8f06-4bb6-9e6c-6258aa92218e"}) @patch( "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" @@ -208,4 +208,4 @@ def test_delete_silence(self, mock_fetch_url, mock_get_version): }, method="DELETE", ) - self.assertEquals(result, {"message": "silence deleted"}) + self.assertEqual(result, {"message": "silence deleted"}) From 40d554b46af108403aaa561bab563ba4687f324b Mon Sep 17 00:00:00 2001 From: rrey Date: Sun, 27 Oct 2024 01:30:10 +0000 Subject: [PATCH 3/3] Update tested Grafana versions --- .github/workflows/ansible-test.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 5cefb2dd..39e90d5f 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - grafana_version: ["11.2.2", "10.4.10", "9.5.20"] + grafana_version: ["11.3.0", "10.4.11", "9.5.20"] ansible_version: ["stable-2.15", "stable-2.16", "devel"] python_version: ["3.11"] services: @@ -67,7 +67,7 @@ jobs: strategy: fail-fast: false matrix: - grafana_version: ["11.2.2", "10.4.10", "9.5.20"] + grafana_version: ["11.3.0", "10.4.11", "9.5.20"] ansible_version: ["stable-2.15", "stable-2.16", "devel"] python_version: ["3.11"] services: diff --git a/README.md b/README.md index bcfa9dbe..0ea88a15 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Click on the name of a plugin or module to view that content's documentation: We aim at keeping the last 3 Major versions of Grafana tested. This collection is currently testing the modules against following versions of Grafana: ``` -grafana_version: ["11.2.2", "10.4.10", "9.5.20"] +grafana_version: ["11.3.0", "10.4.11", "9.5.20"] ``` ## Installation and Usage