forked from devusb/sentinelone-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.nix
31 lines (29 loc) · 807 Bytes
/
test.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
pkgs,
nixosModules,
}:
pkgs.nixosTest {
name = "sentinelone";
nodes = {
sentinelone = {
imports = [
nixosModules.default
"${pkgs.path}/nixos/tests/common/user-account.nix"
];
users.users.alice.extraGroups = [ "wheel" ];
security.sudo.wheelNeedsPassword = false;
services.sentinelone = {
enable = true;
serialNumber = "42069B00B5";
# base64 encoded config with fake site key
sentinelOneManagementTokenPath = pkgs.writeText "s1_token" "eyJ1cmwiOiAiaHR0cHM6Ly9zZW50aW5lbG9uZS1wcm9ncmFtLnNlbnRpbmVsb25lLm5ldCIsICJz
aXRlX2tleSI6ICJmM2M4N2IyZTlhMWQ0YzZlIn0KCg==";
};
};
};
testScript = ''
start_all()
sentinelone.wait_for_unit("sentinelone.service")
'';
}