mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Test the inclusion of transitive symlinks in the sandbox
This commit is contained in:
parent
acbb1523c1
commit
cef677ddbc
1 changed files with 4 additions and 1 deletions
|
@ -61,9 +61,11 @@ testCert () {
|
||||||
nocert=$TEST_ROOT/no-cert-file.pem
|
nocert=$TEST_ROOT/no-cert-file.pem
|
||||||
cert=$TEST_ROOT/some-cert-file.pem
|
cert=$TEST_ROOT/some-cert-file.pem
|
||||||
symlinkcert=$TEST_ROOT/symlink-cert-file.pem
|
symlinkcert=$TEST_ROOT/symlink-cert-file.pem
|
||||||
|
transitivesymlinkcert=$TEST_ROOT/transitive-symlink-cert-file.pem
|
||||||
symlinkDir=$TEST_ROOT/symlink-dir
|
symlinkDir=$TEST_ROOT/symlink-dir
|
||||||
echo -n "CERT_CONTENT" > $cert
|
echo -n "CERT_CONTENT" > $cert
|
||||||
ln -s $cert $symlinkcert
|
ln -s $cert $symlinkcert
|
||||||
|
ln -s $symlinkcert $transitivesymlinkcert
|
||||||
ln -s $TEST_ROOT $symlinkDir
|
ln -s $TEST_ROOT $symlinkDir
|
||||||
|
|
||||||
# No cert in sandbox when not a fixed-output derivation
|
# No cert in sandbox when not a fixed-output derivation
|
||||||
|
@ -78,8 +80,9 @@ testCert missing fixed-output "$nocert"
|
||||||
# Cert in sandbox when ssl-cert-file is set to an existing file
|
# Cert in sandbox when ssl-cert-file is set to an existing file
|
||||||
testCert present fixed-output "$cert"
|
testCert present fixed-output "$cert"
|
||||||
|
|
||||||
# Cert in sandbox when ssl-cert-file is set to a symlink to an existing file
|
# Cert in sandbox when ssl-cert-file is set to a (potentially transitive) symlink to an existing file
|
||||||
testCert present fixed-output "$symlinkcert"
|
testCert present fixed-output "$symlinkcert"
|
||||||
|
testCert present fixed-output "$transitivesymlinkcert"
|
||||||
|
|
||||||
# Symlinks should be added in the sandbox directly and not followed
|
# Symlinks should be added in the sandbox directly and not followed
|
||||||
nix-sandbox-build symlink-derivation.nix -A depends_on_symlink
|
nix-sandbox-build symlink-derivation.nix -A depends_on_symlink
|
||||||
|
|
Loading…
Reference in a new issue