summary refs log tree commit diff stats
path: root/tests/nixos/vhack/git-server/ssh_keys.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-02 23:04:51 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-13 22:40:34 +0200
commit0f76cb12a57ccbd535bae08b01e7a840be639b08 (patch)
treec45746e42d150733ce3b6bc3b732c110e60d5bc9 /tests/nixos/vhack/git-server/ssh_keys.nix
parentfeat(nixos/git-server): Add further cgit settings (diff)
downloadnixos-server-0f76cb12a57ccbd535bae08b01e7a840be639b08.tar.gz
nixos-server-0f76cb12a57ccbd535bae08b01e7a840be639b08.zip
test(tests/git-server): Add initial tests
The last line, testing for the about page rendering is not yet working.
I assume that's because of our hand-rolled list-to-string function thingy
in the `cgitrc`. After <https://github.com/NixOS/nixpkgs/pull/317293> is
merged, this should probably improve immensely.
Diffstat (limited to 'tests/nixos/vhack/git-server/ssh_keys.nix')
-rw-r--r--tests/nixos/vhack/git-server/ssh_keys.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/nixos/vhack/git-server/ssh_keys.nix b/tests/nixos/vhack/git-server/ssh_keys.nix
new file mode 100644
index 0000000..07f0b88
--- /dev/null
+++ b/tests/nixos/vhack/git-server/ssh_keys.nix
@@ -0,0 +1,49 @@
+{pkgs}: {
+  admin = {
+    priv = pkgs.writeText "id_ed25519" ''
+      -----BEGIN OPENSSH PRIVATE KEY-----
+      b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+      QyNTUxOQAAACDu7qxYQAPdAU6RrhB3llk2N1v4PTwcVzcX1oX265uC3gAAAJBJiYxDSYmM
+      QwAAAAtzc2gtZWQyNTUxOQAAACDu7qxYQAPdAU6RrhB3llk2N1v4PTwcVzcX1oX265uC3g
+      AAAEDE1W6vMwSEUcF1r7Hyypm/+sCOoDmKZgPxi3WOa1mD2u7urFhAA90BTpGuEHeWWTY3
+      W/g9PBxXNxfWhfbrm4LeAAAACGJmb0BtaW5pAQIDBAU=
+      -----END OPENSSH PRIVATE KEY-----
+    '';
+
+    pub = ''
+      ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7urFhAA90BTpGuEHeWWTY3W/g9PBxXNxfWhfbrm4Le root@client
+    '';
+  };
+
+  alice = {
+    priv = pkgs.writeText "id_ed25519" ''
+      -----BEGIN OPENSSH PRIVATE KEY-----
+      b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+      QyNTUxOQAAACBbeWvHh/AWGWI6EIc1xlSihyXtacNQ9KeztlW/VUy8wQAAAJAwVQ5VMFUO
+      VQAAAAtzc2gtZWQyNTUxOQAAACBbeWvHh/AWGWI6EIc1xlSihyXtacNQ9KeztlW/VUy8wQ
+      AAAEB7lbfkkdkJoE+4TKHPdPQWBKLSx+J54Eg8DaTr+3KoSlt5a8eH8BYZYjoQhzXGVKKH
+      Je1pw1D0p7O2Vb9VTLzBAAAACGJmb0BtaW5pAQIDBAU=
+      -----END OPENSSH PRIVATE KEY-----
+    '';
+
+    pub = pkgs.writeText "id_ed25519.pub" ''
+      ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFt5a8eH8BYZYjoQhzXGVKKHJe1pw1D0p7O2Vb9VTLzB alice@client
+    '';
+  };
+
+  bob = {
+    priv = pkgs.writeText "id_ed25519" ''
+      -----BEGIN OPENSSH PRIVATE KEY-----
+      b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+      QyNTUxOQAAACCWTaJ1D9Xjxy6759FvQ9oXTes1lmWBciXPkEeqTikBMAAAAJDQBmNV0AZj
+      VQAAAAtzc2gtZWQyNTUxOQAAACCWTaJ1D9Xjxy6759FvQ9oXTes1lmWBciXPkEeqTikBMA
+      AAAEDM1IYYFUwk/IVxauha9kuR6bbRtT3gZ6ZA0GLb9txb/pZNonUP1ePHLrvn0W9D2hdN
+      6zWWZYFyJc+QR6pOKQEwAAAACGJmb0BtaW5pAQIDBAU=
+      -----END OPENSSH PRIVATE KEY-----
+    '';
+
+    pub = pkgs.writeText "id_ed25519.pub" ''
+      ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZNonUP1ePHLrvn0W9D2hdN6zWWZYFyJc+QR6pOKQEw bob@client
+    '';
+  };
+}