gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 09/09: tests/file-sharing: Test request-loc-signature ro


From: gnunet
Subject: [gnunet-scheme] 09/09: tests/file-sharing: Test request-loc-signature round-tripping.
Date: Sat, 03 Dec 2022 14:14:39 +0100

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 8e9c3b86b8895172bcd96a4375775c442b3b072d
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Dec 3 14:11:29 2022 +0100

    tests/file-sharing: Test request-loc-signature round-tripping.
    
    * tests/file-sharing.scm (normalise,$file-length,$purpose,$expiration-time):
    New variables.
    ("analyse + construct round-trips (request-loc-signature)"): New test.
---
 tests/file-sharing.scm | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/tests/file-sharing.scm b/tests/file-sharing.scm
index 986db6c..b3cdbf0 100644
--- a/tests/file-sharing.scm
+++ b/tests/file-sharing.scm
@@ -18,11 +18,45 @@
 (define-module (test-file-sharing))
 (import (gnu gnunet fs client)
        (srfi srfi-64)
+       (gnu gnunet fs client)
+       (gnu gnunet fs network)
+       (gnu gnunet fs quickcheck)
+       (gnu gnunet fs uri)
+       (gnu gnunet hashcode)
+       (quickcheck arbitrary)
+       (ice-9 match)
        (tests utils))
 
 (test-begin "file-sharing")
 
-;; Standard tests
+(define (normalise list)
+  (pk list)
+  (map (match-lambda
+       ((? chk? #;content-hash-key? k)
+        (make-chk
+         (copy-hashcode:512 (chk-key k))
+         (copy-hashcode:512 (chk-query k))))
+       (foo foo))
+       list))
+
+(define (construct-request-loc-signature* x y z w)
+  (construct-request-loc-signature x y z #:purpose w))
+
+;; Network messages
+(define $file-length $natural) ; TODO bounds
+(define $purpose $natural) ; TODO bounds
+(define $expiration-time $natural) ; TODO bounds
+(test-expect-fail 1)
+(test-roundtrip "analyse + construct round-trips (request-loc-signature)"
+               analyse-request-loc-signature construct-request-loc-signature*
+               normalise
+               (content-hash-key $content-hash-key)
+               (file-length $file-length)
+               (expiration-time $expiration-time)
+               (purpose $purpose))
+
+
+;; Standard service tests
 (test-assert "close, not connected --> all fibers stop, no callbacks called"
   (close-not-connected-no-callbacks "fs" (pk connect) disconnect!))
 (test-assert "garbage collectable"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]