Browse Source

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

timvisee 6 years ago
parent
commit
8cb9f3b6b1
1 changed files with 11 additions and 9 deletions
  1. 11 9
      .gitlab-ci.yml

+ 11 - 9
.gitlab-ci.yml

@@ -132,17 +132,19 @@ test-public:
   before_script: []
   before_script: []
   script:
   script:
     # Generate random file, upload/download and assert equality
     # 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
     # 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
 # Cargo crate release
 release-crate:
 release-crate: