mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 00:04:11 +00:00
25bef2d8f9
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
# Verifies that the configuration suggested in deprecated example values
|
|
# will result in the expected output.
|
|
|
|
import ../make-test-python.nix ({ pkgs, ...} : {
|
|
name = "krb5-with-deprecated-config";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ eqyiel ];
|
|
};
|
|
|
|
machine =
|
|
{ ... }: {
|
|
krb5 = {
|
|
enable = true;
|
|
defaultRealm = "ATHENA.MIT.EDU";
|
|
domainRealm = "athena.mit.edu";
|
|
kdc = "kerberos.mit.edu";
|
|
kerberosAdminServer = "kerberos.mit.edu";
|
|
};
|
|
};
|
|
|
|
testScript =
|
|
let snapshot = pkgs.writeText "krb5-with-deprecated-config.conf" ''
|
|
[libdefaults]
|
|
default_realm = ATHENA.MIT.EDU
|
|
|
|
[realms]
|
|
ATHENA.MIT.EDU = {
|
|
admin_server = kerberos.mit.edu
|
|
kdc = kerberos.mit.edu
|
|
}
|
|
|
|
[domain_realm]
|
|
.athena.mit.edu = ATHENA.MIT.EDU
|
|
athena.mit.edu = ATHENA.MIT.EDU
|
|
|
|
[capaths]
|
|
|
|
|
|
[appdefaults]
|
|
|
|
|
|
[plugins]
|
|
|
|
'';
|
|
in ''
|
|
machine.succeed(
|
|
"diff /etc/krb5.conf ${snapshot}"
|
|
)
|
|
'';
|
|
})
|