diff options
author | Thomas Gerbet <thomas@gerbet.me> | 2023-12-03 12:34:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 12:34:54 +0100 |
commit | eac9180f29e108a52cb5384caa802da736c2c3bc (patch) | |
tree | 769cb08bd21653b5b4f13644103ab918c0f3de4a /pkgs/servers | |
parent | 4d139f4f0e0b3d6ac2620fcb7ec07d3bc2cbe789 (diff) | |
parent | 330d2db19fa25fad7e3d9b5066b5fd82cd66bbe3 (diff) |
Merge pull request #264685 from Ma27/grafana-tests
grafana: skip two more flaky tests
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/monitoring/grafana/default.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index c4c9c75903a2c..d224a7695f96d 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -22,7 +22,16 @@ buildGoModule rec { nativeBuildInputs = [ wire ]; - preBuild = '' + preBuild = let + skipTest = lineOffset: testCase: file: + let + jumpAndAppend = lib.concatStringsSep ";" (lib.replicate (lineOffset - 1) "n" ++ [ "a" ]); + in '' + sed -i -e '/${testCase}/{ + ${jumpAndAppend} t.Skip(); + }' ${file} + ''; + in '' # Generate DI code that's required to compile the package. # From https://github.com/grafana/grafana/blob/v8.2.3/Makefile#L33-L35 wire gen -tags oss ./pkg/server @@ -42,12 +51,14 @@ buildGoModule rec { # [...] # grafana> t=2021-12-02T14:24:58+0000 lvl=dbug msg="Failed to get latest.json repo from github.com" logger=update.checker error="Get \"https://raw.githubusercontent.com/grafana/grafana/main/latest.json\": dial tcp: lookup raw.githubusercontent.com on [::1]:53: read udp [::1]:36391->[::1]:53: read: connection refused" # grafana> t=2021-12-02T14:24:58+0000 lvl=dbug msg="Failed to get plugins repo from grafana.com" logger=plugin.manager error="Get \"https://grafana.com/api/plugins/versioncheck?slugIn=&grafanaVersion=\": dial tcp: lookup grafana.com on [::1]:53: read udp [::1]:41796->[::1]:53: read: connection refused" - sed -i -e '/Request is not forbidden if from an admin/a t.Skip();' pkg/tests/api/plugins/api_plugins_test.go + ${skipTest 1 "Request is not forbidden if from an admin" "pkg/tests/api/plugins/api_plugins_test.go"} # Skip a flaky test (https://github.com/NixOS/nixpkgs/pull/126928#issuecomment-861424128) - sed -i -e '/it should change folder successfully and return correct result/{N;s/$/\nt.Skip();/}'\ - pkg/services/libraryelements/libraryelements_patch_test.go + ${skipTest 2 "it should change folder successfully and return correct result" "pkg/services/libraryelements/libraryelements_patch_test.go"} + # Skip flaky tests (https://logs.ofborg.org/?key=nixos/nixpkgs.263185&attempt_id=5b056a17-67a7-4b74-9dc7-888eb1d6c2dd) + ${skipTest 1 "TestIntegrationRulerAccess" "pkg/tests/api/alerting/api_alertmanager_test.go"} + ${skipTest 1 "TestIntegrationRulePause" "pkg/tests/api/alerting/api_ruler_test.go"} # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go rm -r scripts/go |