[QA] Run UploadWizard API integration test against production...
Gergo Tisza
gtisza at wikimedia.org
Tue Jan 28 19:23:22 UTC 2014
Hi Željko,
On Tue, Jan 28, 2014 at 4:15 AM, Željko Filipin <zfilipin at wikimedia.org>wrote:
> On Mon, Jan 27, 2014 at 8:17 PM, Gergo Tisza <gtisza at wikimedia.org> wrote:
>
>> I have some issues with how the environment variables are handled, I left
>> some comments in gerrit.
>
>
> I have left my lengthy comment[1] there too. :)
>
I see what you mean - I didn't realize exports are echoed back.
At the risk of overcomplicating things, you could just disable that before
setting the parameter. It could be even wrapped into a function to look
neater:
function copy_variable {
set +x;
export $2=${!1};
set -x;
}
copy_variable MEDIAWIKI_PASSWORD_COMMONS MEDIAWIKI_PASSWORD
# run script
...but I'm fine with the double os.getenv version if you don't like this
(admittedly it would be more robust than relying on bash tricks).
This reminded me to something that I forgot to mention, though: the
set -eflag should be set at the beginning of the script, otherwise
only the
return value of last command is checked for error status, and any errors in
the non-gen_new_image version are ignored.
regards
Gergő
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140128/e1c8b70b/attachment.html>
More information about the QA
mailing list