Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
libstore-network.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <gtest/gtest.h>
5
6
namespace
nix::testing {
7
12
extern
bool
networkTestsAvailable
;
13
19
void
setupNetworkTests
();
20
21
class
LibStoreNetworkTest
:
public
virtual
::testing::Test
22
{
23
protected
:
24
void
SetUp()
override
25
{
26
if
(
networkTestsAvailable
)
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
nix::testing::LibStoreNetworkTest
Definition
libstore-network.hh:22
nix::testing::networkTestsAvailable
bool networkTestsAvailable
Definition
libstore-network.cc:19
nix::testing::setupNetworkTests
void setupNetworkTests()
Definition
libstore-network.cc:50
libstore-test-support
include
nix
store
tests
libstore-network.hh
Generated by
1.18.0