gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 38/254: tests: added --remote-time tests for remain


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 38/254: tests: added --remote-time tests for remaining protocols that support it
Date: Sat, 17 Jun 2017 16:51:10 +0200

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

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit 584142892f7d5fb3100f3c0ef8e479d472b8c3c7
Author: Dan Fandrich <address@hidden>
AuthorDate: Sat Apr 29 10:16:06 2017 +0200

    tests: added --remote-time tests for remaining protocols that support it
---
 tests/data/Makefile.inc  |  1 +
 tests/data/test1444      | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/data/test1445      | 35 ++++++++++++++++++++++++++++++++
 tests/data/test1446      | 42 ++++++++++++++++++++++++++++++++++++++
 tests/libtest/test613.pl |  4 ++++
 5 files changed, 134 insertions(+)

diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index 5cf4f562a..9e573f6aa 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -154,6 +154,7 @@ test1416 test1417 test1418 test1419 test1420 test1421 
test1422 test1423 \
 test1424 \
 test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
 test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
+test1444 test1445 test1446 \
 \
 test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
 test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
diff --git a/tests/data/test1444 b/tests/data/test1444
new file mode 100644
index 000000000..7eec21b99
--- /dev/null
+++ b/tests/data/test1444
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+RETR
+--remote-time
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+file data
+</data>
+<mdtm>
+213 20090213233130
+</mdtm>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with --remote-time
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1444 --remote-time
+</command>
+# Verify the mtime of the file. The mtime is specifically chosen to be an even
+# number so that it can be represented exactly on a FAT filesystem.
+<postcheck>
+perl -e 'exit((stat("log/curl1444.out"))[9] != 1234567890)'
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS address@hidden
+PWD
+MDTM 1444
+EPSV
+TYPE I
+SIZE 1444
+RETR 1444
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1445 b/tests/data/test1445
new file mode 100644
index 000000000..f60483dcd
--- /dev/null
+++ b/tests/data/test1445
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+FILE
+--remote-time
+</keywords>
+</info>
+
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+<precheck>
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1445.dir
+</precheck>
+ <name>
+file:// with --remote-time
+ </name>
+ <command>
+file://localhost/%PWD/log/test1445.dir/plainfile.txt --remote-time
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1445.dir && \
+perl -e 'exit((stat("log/curl1445.out"))[9] != 946728000)'
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1446 b/tests/data/test1446
new file mode 100644
index 000000000..7d5ec9fc2
--- /dev/null
+++ b/tests/data/test1446
@@ -0,0 +1,42 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+--remote-time
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1446.dir
+</precheck>
+ <name>
+SFTP with --remote-time
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: 
sftp://%HOSTIP:%SSHPORT%PWD/log/test1446.dir/rofile.txt --insecure --remote-time
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1446.dir && \
+perl -e 'exit((stat("log/curl1446.out"))[9] != 978264000)'
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl
index b4caaae07..03d09cb5b 100755
--- a/tests/libtest/test613.pl
+++ b/tests/libtest/test613.pl
@@ -30,6 +30,8 @@ if ($ARGV[0] eq "prepare")
     binmode FILE;
     print FILE "Test file to support curl test suite\n";
     close(FILE);
+    # The mtime is specifically chosen to be an even number so that it can be
+    # represented exactly on a FAT filesystem.
     utime time, timegm(0,0,12,1,0,100), "plainfile.txt";
     chmod 0666, "plainfile.txt";
 
@@ -37,6 +39,8 @@ if ($ARGV[0] eq "prepare")
     binmode FILE;
     print FILE "Read-only test file to support curl test suite\n";
     close(FILE);
+    # The mtime is specifically chosen to be an even number so that it can be
+    # represented exactly on a FAT filesystem.
     utime time, timegm(0,0,12,31,11,100), "rofile.txt";
     chmod 0444, "rofile.txt";
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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