diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2017-04-21 11:39:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-04-21 17:23:37 +0200 |
commit | 1397b422e254929de1805aaf1d0759cd5da6a60b (patch) | |
tree | ca37bb9b955a3f11b10c07905c35b078e0e3f641 /tests/store.scm | |
parent | 031e6087c4c30b00f31824d269cfbf67a7c54f31 (diff) | |
download | patches-1397b422e254929de1805aaf1d0759cd5da6a60b.tar patches-1397b422e254929de1805aaf1d0759cd5da6a60b.tar.gz |
store: 'GUIX_DAEMON_SOCKET' can now be a URI.
* guix/store.scm (%daemon-socket-file): Rename to...
(%daemon-socket-uri): ... this.
(connect-to-daemon): New procedure.
(open-connection): Rename 'file' to 'uri'. Use 'connect-to-daemon'
instead of 'open-unix-domain-socket'.
* guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'.
* tests/guix-build.sh: Add tests.
* tests/store.scm ("open-connection with file:// URI"): New tests.
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm index 45150d36ca..3eb8b7be5a 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"))) |