From 86ce1865b6f5617e7f15643c03238735e81e109c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 15 Apr 2023 14:35:49 +0200 Subject: [PATCH 1/2] Revert "grafana: skip a test that started failing" This reverts commit cdefbd2eb03c0ad875f43d2a003678ff73395a82. Let's fix the test instead. --- pkgs/servers/monitoring/grafana/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index ef1fab4cb993..b3162a4c6791 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -48,9 +48,6 @@ buildGoModule rec { sed -i -e '/it should change folder successfully and return correct result/{N;s/$/\nt.Skip();/}'\ pkg/services/libraryelements/libraryelements_patch_test.go - # TODO: investigate? - substituteInPlace pkg/tests/api/alerting/api_alertmanager_test.go \ - --replace TestIntegrationAMConfigAccess DontTestIntegrationAMConfigAccess # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go rm -r scripts/go From f3ec1208820ecd1a6509fe79629535abbf44bd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 15 Apr 2023 14:39:29 +0200 Subject: [PATCH 2/2] grafana: fix a test by upstream patch --- pkgs/servers/monitoring/grafana/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index b3162a4c6791..068154b601d1 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchurl, fetchFromGitHub, nixosTests, tzdata, wire }: +{ lib, buildGoModule, fetchurl, fetchFromGitHub, fetchpatch, nixosTests, tzdata, wire }: buildGoModule rec { pname = "grafana"; @@ -18,6 +18,14 @@ buildGoModule rec { sha256 = "sha256-HiKr1ier13xUlrwsJrxo60wwqmiPcza2oOLIfMgFWc0="; }; + patches = [ + (fetchpatch { # https://github.com/grafana/grafana/pull/65790 + name = "fix-TestIntegrationAMConfigAccess.patch"; + url = "https://github.com/grafana/grafana/commit/8500eb1c180b4d49a8e17bfd6df675d821d038a4.diff"; + sha256 = "sha256-TWPn9fLjmCbXGXkxAc3NLTN+0XXjsaspaV4gYKg3+Mk="; + }) + ]; + vendorSha256 = "sha256-sUvjZTg2/6UGjc2Qv8YO4IWlS4Y/FzGRVOQ9I/wp/aM="; nativeBuildInputs = [ wire ];