18961[BUGFIX] Fix .zip-export on windows and add unit test
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Wouter Wolters +1
- Jost Baron +1
-
Verified V +2
- Christian Kuhn +2
- Wouter Wolters +1
- Jost Baron +1
Files 2
Review log 19
-
Christian Kuhn commented on patch set 1 03/20/13, 20:29
I would prefer that you didn't submit this As far as I can see, the code does not include directories at all, which is not cool (correct me if I'm wrong). It should be possible to use addEmptyDir in a recursion, right? Furthermore, this is the second time we're fiddling with the method to fix issues, so it should definatly be covered by unit tests. -
Philipp Gampe commented on patch set 1 03/20/13, 20:29
@Jost, you can create needed files into the typo3temp/unique-folder-name/. Check the update test for some ideas. -
Mr. Jenkins commented on patch set 1 03/20/13, 20:29
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/7753/ : SUCCESS -
Jost Baron commented on patch set 1 03/20/13, 20:29
Hi Christian! (Unit)Tests are a very good idea for this - but how should that be done? We'd need at least one example extension that can be exported, and a correct export of that extension. All of that stuff needs to be shipped with the core. Or is there an easy way to test such a thing? Directories are exported by the modified version of that method, but only if they or one of their subdirectories contains at least one file. In that case, the directory is implicitely created by the addition of the file. Using addEmptyDir could help here - I'll check on that later. -
Christian Kuhn commented on patch set 2 03/20/13, 20:29
@Jost: Would you like to take a look at https://review.typo3.org/#/c/19097/ ? I'm not 100% sure if the solution there is the way to go ... -
Christian Kuhn commented on patch set 3 03/20/13, 20:29
@Wouter: would you like to test this patch in a windows environment? -
Christian Kuhn uploaded patch set 3 03/20/13, 20:29
-
Christian Kuhn commented on patch set 3 03/20/13, 20:29
Verified; Looks good to me, but someone else must approve Thanks! Very good work :) I've streamlined the test a bit: The creation of the test files shouldn't be asserted since this would be a problem of the test, but not of the system under test. Furthermore, it is usually not wanted to assert multiple things at once, but in this case it is very convenient to do so. I've added a warning about this fact to the test method header. And I've added an assertion to see if the zip method creates a file with the expected filename. Codewise I've swapped the "is_dir" and "is_file", making the is_file test obsolete. This way, unix links should be packages as well, probably (no test for that though). -
Christian Kuhn uploaded patch set 4 03/20/13, 20:29
-
Christian Kuhn commented on patch set 4 03/20/13, 20:29
Small hint: We usually leave the 'message' part out for assertions. In this case, with all those assertions it is useful, though. -
Christian Kuhn commented on patch set 4 03/20/13, 20:29
Verified; Looks good to me, but someone else must approve -
Mr. Jenkins commented on patch set 2 03/20/13, 20:29
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/7812/ : SUCCESS -
Mr. Jenkins commented on patch set 3 03/20/13, 20:29
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/7815/ : SUCCESS -
Mr. Jenkins commented on patch set 4 03/20/13, 20:29
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/7817/ : SUCCESS -
Wouter Wolters commented on patch set 4 03/20/13, 20:29
Verified; Looks good to me, but someone else must approve -
Jost Baron uploaded patch set 2 03/20/13, 20:29
-
Jost Baron commented on patch set 4 03/20/13, 20:29
Verified; Looks good to me, but someone else must approve Thanks for the hints :-) -
Christian Kuhn commented on patch set 4 V 0 03/20/13, 20:29
by team member; Looks good to me, approved -
Christian Kuhn merged patch set 5 03/20/13, 20:29