diff options
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/store.scm b/tests/store.scm index 45150d36ca..45aeb329b0 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -48,6 +48,14 @@ (test-begin "store") +(test-assert "open-connection with file:// URI" + (let ((store (open-connection (string-append "file://" + (%daemon-socket-uri))))) + (and (add-text-to-store store "foo" "bar") + (begin + (close-connection store) + #t)))) + (test-equal "connection handshake error" EPROTO (let ((port (%make-void-port "rw"))) @@ -750,8 +758,9 @@ (cut export-paths %store (list file) <>)))) (delete-paths %store (list file)) - ;; Flip a bit in the stream's payload. - (let* ((index (quotient (bytevector-length dump) 4)) + ;; Flip a bit in the stream's payload. INDEX here falls in the middle of + ;; the file contents in DUMP, regardless of the store prefix. + (let* ((index #x70) (byte (bytevector-u8-ref dump index))) (bytevector-u8-set! dump index (logxor #xff byte))) |