Commit graph

171 commits

Author SHA1 Message Date
Olivier Goffart
a4dbf5942c owncloudcmd: restart the sync if required
Fixes #2038
2014-09-12 17:23:01 +02:00
Olivier Goffart
a73fbccf8c t4.pl: add a test to test that ignored file are not deleted 2014-08-28 19:33:52 +02:00
Klaas Freitag
f1fb36bcb8 Tests: Get rid of the Carp package that ogoffart does not have.
Recommendation: Use a decent distribution! But anyway....
2014-08-28 18:10:53 +02:00
Klaas Freitag
e06e5fe55f Excludes: Fix unit tests for the new exclude load interface.
Also removed some commented lines.
2014-08-21 13:12:05 +02:00
Markus Goetz
4c0891a22e Tests: Give a more random name to test directories
Conflicts:
	csync/tests/ownCloud/ownCloud/Test.pm
2014-08-12 16:27:03 +02:00
Klaas Freitag
c3f8e099f4 tests: Never stumble over an already existing test share dir. 2014-08-07 15:45:17 +02:00
Klaas Freitag
e71ce01f90 tests: Some more tests with local files and shares. 2014-08-07 12:48:14 +02:00
Olivier Goffart
6827f9977c Merge branch 'il'
Conflicts:
	doc/ocdoc
2014-08-07 12:15:50 +02:00
Olivier Goffart
6d24bd0361 journaldb: Fix that fileid might be missing in the db
When recovering from a inalid move operation, we call
avoidReadFromDbOnNextSync. This will remove the fileid from the db so
we don't detect a move on the next sync.  But we want the next sync to fetch
the file id again, and this can only happen if we don't read them
from the db and do the actual PROPFIND, this is done by avoidReadFromDbOnNextSync

However, if there is propagation in that source directory later, it
will overide the invalid etag with the real one and we will not uissue the PROPFIND
to fetch the fileid.
We must therefore also protect the future write to the DB when calling
avoidReadFromDbOnNextSync
2014-08-07 12:14:45 +02:00
Markus Goetz
22c1629dd3 SyncEngine: Keep csync_journal with proper values for fileId and remotePerm
Before this patch, we had a lot of empty rows because we created
the SyncFileItems with the wrong(=local) data.
2014-08-07 10:14:14 +02:00
Klaas Freitag
fe2e4d87c5 tests: Fix t5: work with ownCloud 7 sharing. 2014-08-06 17:19:02 +02:00
Klaas Freitag
e9c4635f6b tests: Add another two seconds break, hope to make it work in virt. env.
Tests fail randomly on the CI computer which is virtualized. Maybe this
fix helps.
2014-08-06 11:34:35 +02:00
Olivier Goffart
f1ad82d0ba t2.pl Fix the test testing that moving a file that was just added do not create duplicate 2014-07-29 13:58:21 +02:00
Klaas Freitag
8d85516e72 tx.pl: Add a chunking update test, test for precondition failed. 2014-07-22 18:07:34 +02:00
Klaas Freitag
4dfe0fad7d tests: Big file chunking, change an existing big file to trigger update
This failed on oC7
2014-07-22 10:45:03 +02:00
Klaas Freitag
74b3e2ce3f tests: Another try to get around the jenkins test problem. 2014-07-18 12:20:14 +02:00
Klaas Freitag
2981b37219 Use file size of factor of four because of the createLocalFile algorithm 2014-07-17 10:29:13 +02:00
Klaas Freitag
2a5691e575 tests: Fix assertion. 2014-07-16 17:26:06 +02:00
Klaas Freitag
774432066e tests: Reverted previous change, do not append in createLocalFile() 2014-07-16 17:25:18 +02:00
Klaas Freitag
d5a8661480 tests: do not use system any more to modify files, rather perl native. 2014-07-16 14:06:57 +02:00
Klaas Freitag
9dacad99fa t1.pl: Change the corruption creation command. 2014-07-10 12:07:28 +02:00
Olivier Goffart
cbc7942a00 Added t8.pl that test case sensitivity issues
Made some change in the .cpp code in order to be able to test
the code when the file system is case sensitive
2014-07-09 22:44:08 +02:00
Olivier Goffart
9c3c4bac66 Merge remote-tracking branch 'origin/il' 2014-07-01 20:37:42 +02:00
Olivier Goffart
2f284209d8 Permissions: When moving is not allowed, fallback to delete and upload
We decided that we never want to rename a directory behind the
back of the user as the user may be using files in the directory
during the sync.
If moving is not allowed, we just erase the inode form the database so
the next sync will try to do an upload and delete and recover from there
using normal resolution.

This also add some code to update the inode back to the db when it is detected
as changed.
2014-06-27 15:30:08 +02:00
Olivier Goffart
9066ad5790 t7.pl: Test that deleting a directory restores it and all its sub directories 2014-06-27 11:31:35 +02:00
Olivier Goffart
62d0e670dc Add t7.pl Test for operation of files with restrictions 2014-06-27 11:22:53 +02:00
Olivier Goffart
21d7d8988a t1.pl: add a sleep to make sure the mtime of the files are different
It could be that the files are changed in the same second if the previous
sync was fast, and therefore the changes not detected.
2014-06-26 13:11:47 +02:00
Olivier Goffart
fbadadc377 propagator: Fix folder duplication if the folder is renamed on the server while uploading
While uploading a new folder, if the folder is renamed on the server
when still uploading, the result will be that the files that are already
uploaded will end up in the new filder name, but the file that were
not still are in the old folder.

After renaming, all the new uploads wil fail with an error on this sync
because the parent directory don't exist.
But they were uploaded with the old name in the next sync because
the renaming was not detected because the file id was not in the DB

Fix the problem by fetching the file id always when creating a new
directory, on the next sync, and saving it in the database ummediatly

https://github.com/owncloud/enterprise/issues/191
2014-06-24 12:00:13 +02:00
Olivier Goffart
ade92d8ac1 csync test: fix warning 2014-06-17 14:16:42 +02:00
Olivier Goffart
d5bd3190d4 csync unit tests: fix cimpilation 2014-06-07 12:08:58 +02:00
Markus Goetz
233450d850 CSync: Remove config dir setting 2014-06-04 10:56:56 +02:00
Markus Goetz
7428a8fa63 CSync: Remove unused std functions 2014-06-04 10:33:19 +02:00
Olivier Goffart
4cb9b3a85b Test: fix compilation 2014-06-03 17:54:43 +02:00
Olivier Goffart
08ca8b54b1 test fles with '%' and '#' 2014-06-03 17:27:06 +02:00
Olivier Goffart
3d8d4fecd7 delete dead code 2014-05-02 11:50:20 +02:00
Olivier Goffart
165e35c750 t1.pl: change assertLocalAndRemoteDir so we actually test something 2014-04-25 14:35:20 +02:00
Klaas Freitag
888843e655 Removed another file for Jenkins. 2014-04-23 13:22:06 +02:00
Klaas Freitag
28970393f6 Removed a test file as jenkins fails on it. 2014-04-23 13:18:28 +02:00
Olivier Goffart
fa38bf7029 Make sure the fileid are saved to the database when upgrading from owncloud5 to owncloud6
We fetch the id from the server, but don't save them in the database.

I Could have used INSTRUCTION_UPDATED for that, but then i would need to update the
reconcile algorithm to take in account the fact that UPDATED is possible there.

Instead, use should_update_etag  which means the db is going to be written again

Remove reference to old instruction _UPDATED and _DELETED which does not make sens with
the new propagator

Improve the test to test this case,  and that etags are properly writen to the DB
when there is a fake conflict
2014-04-18 18:27:27 +02:00
Olivier Goffart
bfdf638334 Add the files required by the tests.
Somehow they got removed with all the moving and merging.
Especially kernelcrash.txt is required for t1.pl
2014-04-18 17:20:42 +02:00
Daniel Molkentin
af3af94a01 Allow tests to run against SSL-self-signed servers 2014-04-08 12:39:46 +02:00
Klaas Freitag
8ed0fdcfa5 Fix info print in test script. 2014-04-07 16:36:35 +02:00
Klaas Freitag
ebf3c78237 More fine granular chunking test - improved t6.pl 2014-04-07 16:30:02 +02:00
Klaas Freitag
fc2923aa9b Unlink the compare file after the remote cleanup. 2014-04-07 15:10:55 +02:00
Klaas Freitag
5aeee6d1f2 Use curl to get the file back, fix the LWP based download later. 2014-04-04 17:00:20 +02:00
Klaas Freitag
a759c93fb6 Add a new test script to check for big file chunking. 2014-04-04 16:33:57 +02:00
Olivier Goffart
20e850501d Make sure we do not remove files that are replaced by a symlink
As we ignore symlink, we should not remove on the server the files that
are ignored.

Change tested in t4.pl

Relates to #1299
2014-04-03 17:47:49 +02:00
Klaas Freitag
062a0907db Remove HTTP::DAV fragment and hardcode required version in Test.pm 2014-04-03 10:16:09 +02:00
Klaas Freitag
ead935e0a6 Add an open to open the dav connection. 2014-04-02 16:45:31 +02:00
Klaas Freitag
cba160706a Minor cleanup 2014-04-01 16:14:24 +02:00
Klaas Freitag
fa453296c9 Enable SSL for testing. 2014-04-01 16:14:24 +02:00
Klaas Freitag
58aaad3fed Add options to createRemoteDir 2014-04-01 16:14:24 +02:00
Klaas Freitag
ab439f8f0f Proper cleanup of the shared directory. 2014-03-28 16:15:59 +01:00
Klaas Freitag
384a8d0d72 Added t5.pl which does basic testing with a Shared directory. 2014-03-28 15:04:14 +01:00
Klaas Freitag
5481215813 Remove unused variable. 2014-03-26 18:18:20 +01:00
Olivier Goffart
98d7ff5116 Don't create .ctmp of sync journal
Fixes #1559
2014-03-26 10:25:50 +01:00
Klaas Freitag
a5ede054d6 Fix statedb tests. 2014-03-20 12:35:16 +01:00
Olivier Goffart
114c8de814 Remove the check_csync_treewalk
because it runs csync_update which need to browse the owncloud directory
And there is no server
2014-03-06 15:30:36 +01:00
Olivier Goffart
7f07385fd7 Remove check_csync_treewalk_remote
Since we removed the vio abstraction, we cannot use the file system anymore
as a remote.  and because we unfortunately can't use a real server,
just disable that test.
2014-03-06 14:24:53 +01:00
Markus Goetz
6906b8d30c csync: Remove outdated tests 2014-02-28 16:43:15 +01:00
Olivier Goffart
869793592d Merge branch '1.5'
Conflicts:
	VERSION.cmake
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-27 11:40:34 +01:00
Olivier Goffart
1e43d1fa49 Add missing license headers in tests
LGPL for csync tests,  GPL for mirall tests
2014-02-24 11:08:58 +01:00
Olivier Goffart
93f31fa9d7 Merge branch '1.5' 2014-02-12 16:44:24 +01:00
Olivier Goffart
1a9a14bdec Fix problems if a file is moved, and another file is created with the same name 2014-02-12 13:44:32 +01:00
Klaas Freitag
b84253054a Read configuration from /etc/ownCloud/t1.cfg 2014-02-10 15:08:40 +01:00
Olivier Goffart
ee3df45fd8 remove csync_lock
It is not used anymore for a long time
2014-02-05 17:31:34 +01:00
Olivier Goffart
94190b73ff fix test compilation 2014-01-26 19:05:43 +01:00
Olivier Goffart
2eb9962f4c Adapt the test to the changes in the exclude list
The exclude list was removed from csync in commit
f32d901653
Adapt the test.
2014-01-26 18:58:56 +01:00
Olivier Goffart
5119d5d366 Remove csync_config
commit c585c73044 removed the use of it.
So remove this code completely as it is no longer used
2014-01-26 18:39:47 +01:00
Olivier Goffart
c7227297af Make it compile with the merge of csync mirall 2014-01-15 12:20:03 +01:00
Olivier Goffart
bf7ca60bec Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00