Skip to content

Commit

Permalink
Test the inclusion of transitive symlinks in the sandbox
Browse files Browse the repository at this point in the history
(cherry picked from commit cef677d)
(cherry picked from commit e8e62c9)

# Conflicts:
#	tests/functional/linux-sandbox.sh
  • Loading branch information
Théophane Hufschmitt authored and mergify[bot] committed Oct 29, 2024
1 parent 90e8476 commit b6f329c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/functional/linux-sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,22 @@ nocert=$TEST_ROOT/no-cert-file.pem
cert=$TEST_ROOT/some-cert-file.pem
symlinkcert=$TEST_ROOT/symlink-cert-file.pem
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> e8e62c95d (Test the inclusion of transitive symlinks in the sandbox)
transitivesymlinkcert=$TEST_ROOT/transitive-symlink-cert-file.pem
symlinkDir=$TEST_ROOT/symlink-dir
echo -n "CERT_CONTENT" > $cert
ln -s $cert $symlinkcert
ln -s $symlinkcert $transitivesymlinkcert
<<<<<<< HEAD
=======
symlinkDir=$TEST_ROOT/symlink-dir
echo -n "CERT_CONTENT" > $cert
ln -s $cert $symlinkcert
>>>>>>> 1cc79f134 (Fix the access of symlinks to host files in the sandbox)
=======
>>>>>>> e8e62c95d (Test the inclusion of transitive symlinks in the sandbox)
ln -s $TEST_ROOT $symlinkDir

# No cert in sandbox when not a fixed-output derivation
Expand All @@ -86,6 +92,7 @@ testCert missing fixed-output "$nocert"
# Cert in sandbox when ssl-cert-file is set to an existing file
testCert present fixed-output "$cert"

<<<<<<< HEAD
<<<<<<< HEAD
# Cert in sandbox when ssl-cert-file is set to a (potentially transitive) symlink to an existing file
testCert present fixed-output "$symlinkcert"
Expand All @@ -94,6 +101,11 @@ testCert present fixed-output "$transitivesymlinkcert"
# Cert in sandbox when ssl-cert-file is set to a symlink to an existing file
testCert present fixed-output "$symlinkcert"
>>>>>>> 1cc79f134 (Fix the access of symlinks to host files in the sandbox)
=======
# 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 "$transitivesymlinkcert"
>>>>>>> e8e62c95d (Test the inclusion of transitive symlinks in the sandbox)

# Symlinks should be added in the sandbox directly and not followed
nix-sandbox-build symlink-derivation.nix -A depends_on_symlink
Expand Down

0 comments on commit b6f329c

Please sign in to comment.