After fixing some bugs in /test/run-test, it now works. There are 7 PHPUnit tests in /tests/. 4 pass and 3 have various failures. I am working on LocalFileTest.php. It returns:
There was 1 failure:
1) testGetThumbVirtualUrl(LocalFileTest) Failed asserting that two strings are equal. expected string mwrepo://test/public/thumb/Test%21 difference < xxxxxxxxxxxxx???????> got string mwrepo://test/thumb/Test%21
This problem arises in the function getThumbVirtualUrl() in /phase3/includes/filerepo/File.php in the statement:
$path = $this->repo->getVirtualUrl() . '/thumb/' . $this->getUrlRel();
Obviously, the function is coded to return something different than the test expects. The problem is, I don't know if this is a bug in the test or in the code.
I have read the README file in the /filerepo/ directory and searched Bugzilla for getThumbVirtualUrl(). The former didn't help with this problem and the latter returned nothing.
Correcting this problem is easy. Either change what the test expects or change the function to return what the test expects. I strongly suspect the correct action is the former, but I have no idea what the code in /filerepo/ does. So, I wonder if somewhat might either confirm or deny my strong suspicion? [Since Tim Starling wrote the README file, perhaps he might comment]
On 8/4/09 11:22 AM, dan nessett wrote:
- testGetThumbVirtualUrl(LocalFileTest) Failed asserting that two
strings are equal. expected stringmwrepo://test/public/thumb/Test%21 difference< xxxxxxxxxxxxx???????> got stringmwrepo://test/thumb/Test%21
[snip]
Obviously, the function is coded to return something different than the test expects. The problem is, I don't know if this is a bug in the test or in the code.
Looks like an old test that needs to be updated. IIRC Tim recently changed the system to use a separate virtual path for thumbs so we can easily configure the system to store thumbs in a different path (and hence different file server) from the primary media files.
-- brion
Great and thanks! After I fix this I will have all of the tests in /tests/ working (it turns out there are 6 not 7 tests - one of the .php files only held an abstract class).
--- On Tue, 8/4/09, Brion Vibber brion@wikimedia.org wrote:
From: Brion Vibber brion@wikimedia.org Subject: Re: [Wikitech-l] getThumbVirtualUrl() behavior To: "Wikimedia developers" wikitech-l@lists.wikimedia.org Date: Tuesday, August 4, 2009, 4:51 PM On 8/4/09 11:22 AM, dan nessett wrote:
- testGetThumbVirtualUrl(LocalFileTest) Failed
asserting that two
strings are equal. expected stringmwrepo://test/public/thumb/Test%21
difference<
xxxxxxxxxxxxx???????> got
stringmwrepo://test/thumb/Test%21 [snip]
Obviously, the function is coded to return something
different than
the test expects. The problem is, I don't know if this
is a bug in
the test or in the code.
Looks like an old test that needs to be updated. IIRC Tim recently changed the system to use a separate virtual path for thumbs so we can easily configure the system to store thumbs in a different path (and hence different file server) from the primary media files.
-- brion
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hoi, When based on criteria, files can be stored elsewhere, you may consider to safe .tiff files separately as well. They are always big and they function mainly for their archival value of the work done in restorations. As it is they are not usable because they do not get rendered. Thanks. Gerard
2009/8/5 Brion Vibber brion@wikimedia.org
On 8/4/09 11:22 AM, dan nessett wrote:
- testGetThumbVirtualUrl(LocalFileTest) Failed asserting that two
strings are equal. expected stringmwrepo://test/public/thumb/Test%21 difference< xxxxxxxxxxxxx???????> got stringmwrepo://test/thumb/Test%21
[snip]
Obviously, the function is coded to return something different than the test expects. The problem is, I don't know if this is a bug in the test or in the code.
Looks like an old test that needs to be updated. IIRC Tim recently changed the system to use a separate virtual path for thumbs so we can easily configure the system to store thumbs in a different path (and hence different file server) from the primary media files.
-- brion
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 8/6/09 3:02 AM, Gerard Meijssen wrote:
When based on criteria, files can be stored elsewhere, you may consider to safe .tiff files separately as well. They are always big and they function mainly for their archival value of the work done in restorations. As it is they are not usable because they do not get rendered.
I'm pretty sure you asked for the ability to upload them specifically, even as a first step without inline rendering. :)
-- brion
Hoi, We are extremely grateful that we CAN upload them. No question there. I can imagine that you have all kinds of storage, my suggestion is to have them where they are not part of the most active files. Again, being able to upload is extremely valuable. When I talk to a museum and archive, I always inform them that we can and do save our .tiff files and this has been an important factor on establishing our bona fides on several occasions. :) Thanks, GerardM
2009/8/6 Brion Vibber brion@wikimedia.org
On 8/6/09 3:02 AM, Gerard Meijssen wrote:
When based on criteria, files can be stored elsewhere, you may consider
to
safe .tiff files separately as well. They are always big and they
function
mainly for their archival value of the work done in restorations. As it
is
they are not usable because they do not get rendered.
I'm pretty sure you asked for the ability to upload them specifically, even as a first step without inline rendering. :)
-- brion
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 8/6/09 10:31 AM, Gerard Meijssen wrote:
Hoi, We are extremely grateful that we CAN upload them. No question there. I can imagine that you have all kinds of storage, my suggestion is to have them where they are not part of the most active files. Again, being able to upload is extremely valuable. When I talk to a museum and archive, I always inform them that we can and do save our .tiff files and this has been an important factor on establishing our bona fides on several occasions. :)
;)
-- brion
wikitech-l@lists.wikimedia.org