Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions testFlake/container-tests/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ forEachDistro "ssh" {
machine.succeed('ssh -i /etc/privatekey -o "StrictHostKeyChecking no" root@localhost echo ok')
machine.succeed('echo "ls /" | sftp -i /etc/privatekey root@localhost')

with subtest("dpkg update do not remove system-managed owned files"):
sshd_sum_before_dpkg = sshd_config.sha256sum
machine.succeed("dpkg-reconfigure openssh-server --frontend=noninteractive")
sshd_config_new = machine.file("/etc/ssh/sshd_config")
assert sshd_config_new.exists, "/etc/ssh/sshd_config should exist"
assert sshd_config_new.sha256sum == sshd_sum_before_dpkg, \
"it seems like dpkg overwote /etc/ssh/sshd_config"

with subtest("deactivation removes known hosts file"):
machine.succeed("${toplevel}/bin/deactivate")
machine.fail("test -f /etc/ssh/ssh_known_hosts")
Expand Down