Pārlūkot izejas kodu

Update CI configuration, test if upload/download produces same file

timvisee 6 gadi atpakaļ
vecāks
revīzija
a91e82407e
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      .gitlab-ci.yml

+ 3 - 1
.gitlab-ci.yml

@@ -111,9 +111,11 @@ public-send-test:
     GIT_STRATEGY: none
   before_script: []
   script:
+    # Generate random file, upload/download and assert equality
     - head -c1m </dev/urandom >testfile
     - ./ffsend upload testfile -n testfile.bin -a -d 10 -p secret -I
-    # TODO: download this file, compare checksums
+    - ./ffsend download $(./ffsend history -q) -p secret -I -o downloadfile
+    - cmp --silent ./testfile ./downloadfile || (echo ERROR: Downloaded file is different than original; exit 1)
 
 # Cargo crate release
 crate: