nixpkgs/pkgs/by-name/ho/honeycomb-refinery/0001-add-NO_REDIS_TEST-env-var-that-disables-Redis-requir.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
965 B
Diff

From 301de689a1f7fae8ee6d0d5bbbe155a351b1b927 Mon Sep 17 00:00:00 2001
From: Jade Lovelace <jadel@mercury.com>
Date: Wed, 9 Nov 2022 11:02:02 -0800
Subject: [PATCH] add NO_REDIS_TEST env-var that disables Redis-requiring tests
---
internal/peer/peers_test.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/internal/peer/peers_test.go b/internal/peer/peers_test.go
index 5ec7f81..c64b1b4 100644
--- a/internal/peer/peers_test.go
+++ b/internal/peer/peers_test.go
@@ -2,6 +2,7 @@ package peer
import (
"context"
+ "os"
"testing"
"time"
@@ -26,6 +27,12 @@ func TestNewPeers(t *testing.T) {
t.Errorf("received %T expected %T", i, &filePeers{})
}
+ // Allow skipping test requiring redis, since Nix builds without redis
+ // available
+ if os.Getenv("NO_REDIS_TEST") != "" {
+ t.Skip("Skipping redis-requiring test");
+ }
+
c = &config.MockConfig{
GetPeerListenAddrVal: "0.0.0.0:8081",
PeerManagementType: "redis",
--
2.37.1