summary refs log tree commit diff
path: root/tests/store.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm
index 38b8efce96..123ea8a787 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -48,6 +48,15 @@
 
 (test-begin "store")
 
+(test-equal "connection handshake error"
+  EPROTO
+  (let ((port (%make-void-port "rw")))
+    (guard (c ((nix-connection-error? c)
+               (and (eq? port (nix-connection-error-file c))
+                    (nix-connection-error-code c))))
+      (open-connection #f #:port port)
+      'broken)))
+
 (test-equal "store-path-hash-part"
   "283gqy39v3g9dxjy26rynl0zls82fmcg"
   (store-path-hash-part