Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
libstore-network.hh
Go to the documentation of this file.
1#pragma once
3
4#include <gtest/gtest.h>
5
6namespace nix::testing {
7
12extern bool networkTestsAvailable;
13
20
21class LibStoreNetworkTest : public virtual ::testing::Test
22{
23protected:
24 void SetUp() override
25 {
27 return;
28 static bool warned = false;
29 if (!warned) {
30 warned = true;
31 GTEST_SKIP()
32 << "Network tests not enabled by default without user namespaces, use NIX_TEST_FORCE_NETWORK_TESTS=1 to override";
33 } else {
34 GTEST_SKIP();
35 }
36 }
37};
38
39} // namespace nix::testing
Definition libstore-network.hh:22
bool networkTestsAvailable
Definition libstore-network.cc:19
void setupNetworkTests()
Definition libstore-network.cc:50