Procházet zdrojové kódy

Improve public Send test, smaller file, no password, proper cleanup

timvisee před 6 roky
rodič
revize
8cb9f3b6b1
1 změnil soubory, kde provedl 11 přidání a 9 odebrání
  1. 11 9
      .gitlab-ci.yml

+ 11 - 9
.gitlab-ci.yml

@@ -132,17 +132,19 @@ test-public:
   before_script: []
   script:
     # Generate random file, upload/download and assert equality
-    - "head -c2m </dev/urandom >testfile"
-    # - "./ffsend-$RUST_TARGET upload testfile -d=10 -p=secret -I"
-    # - "./ffsend-$RUST_TARGET download $(./ffsend-$RUST_TARGET history -q) -p=secret -I -o=downloadfile"
-    # - "./ffsend-$RUST_TARGET delete $(./ffsend-$RUST_TARGET history -q)"
-    # - "cmp --silent ./testfile ./downloadfile || (echo ERROR: Downloaded file is different than original; exit 1)"
+    - "head -c2k </dev/urandom >test.txt"
+    - "./ffsend-$RUST_TARGET upload test.txt -d2 -I"
+    - "./ffsend-$RUST_TARGET download $(./ffsend-$RUST_TARGET history -q) -I -o=download.txt"
+    - "./ffsend-$RUST_TARGET delete $(./ffsend-$RUST_TARGET history -q) -I"
+    - "cmp --silent ./test.txt ./download.txt || (echo ERROR: Downloaded file is different than original; exit 1)"
+    - "rm ./download.txt"
 
     # Also test Firefox Send v3
-    - "./ffsend-$RUST_TARGET upload --host http://send2.dev.lcip.org/ testfile -d=10 -p=secret -I"
-    - "./ffsend-$RUST_TARGET download $(./ffsend-$RUST_TARGET history -q) -p=secret -I -o=downloadfile2"
-    - "./ffsend-$RUST_TARGET delete $(./ffsend-$RUST_TARGET history -q)"
-    - "cmp --silent ./testfile ./downloadfile2 || (echo ERROR: Downloaded file is different than original; exit 1)"
+    - "./ffsend-$RUST_TARGET upload --host http://send2.dev.lcip.org/ test.txt -d2 -I"
+    - "./ffsend-$RUST_TARGET download $(./ffsend-$RUST_TARGET history -q) -I -o=download.txt"
+    - "./ffsend-$RUST_TARGET delete $(./ffsend-$RUST_TARGET history -q) -I"
+    - "cmp --silent ./test.txt ./download.txt || (echo ERROR: Downloaded file is different than original; exit 1)"
+    - "rm ./download.txt"
 
 # Cargo crate release
 release-crate: