Hey James,

These were the 2 errors:

5) Failure:
test_find_network:_consistency_check_of_network_id_failure(NetworkUtilsTest) 
[/home/travis/build/crowbar/travis-ci-crowbar/crowbar_framework/test/unit/network_utils_test.rb:65]:
There is no Deployment with id default.
<400> expected but was
<404>.

6) Failure:
test_find_network:_success_when_only_network_name_supplied(NetworkUtilsTest) 
[/home/travis/build/crowbar/travis-ci-crowbar/crowbar_framework/test/unit/network_utils_test.rb:82]:
Return code of 200 expected, got 404: There is no Deployment with id default.
<200> expected but was
<404>.

Here's a link to a build where they were present: 
https://travis-ci.org/crowbar/travis-ci-crowbar/jobs/5477618

They are no longer present because I worked around the issue by not using 
I18n.t() to determine the default deployment name.  That said, I'm sure this 
problem will resurface again.


Thanks,

Chris


From: James Tan [mailto:[email protected]]
Sent: Thursday, March 14, 2013 2:32 PM
To: Dearborn, Chris
Cc: crowbar
Subject: Re: [Crowbar] [Still Failing] crowbar/travis-ci-crowbar#60 (master - 
ac51708)

Hi Chris,

On 03/13/2013 07:14 PM, 
[email protected]<mailto:[email protected]> wrote:
I took a look at this issue, and the problem is that translation is not working 
properly in the Travis test setup.
A new migration was added that creates the default network barclamp deployment. 
 In that migration, I initially used Barclamp::DEFAULT_DEPLOYMENT_NAME for the 
name of the deployment.  I later used the same constant to look up the default 
deployment.  This failed in the dev test environment because the I18n.t call 
was failing during the database migration and defaulting to "default", while it 
was succeeding in the I18n.t call while the unit tests were running, which 
caused it to try to look up a deployment with the name "Default".  This caused 
the lookup to fail, and resulted in errors in the dev test environment that 
were identical to those seen in Travis.  To work around this problem (I think 
translation failing during DB migration is probably understandable - correct me 
if you think otherwise), I hard coded the Deployment name to "Default" in the 
DB migration, and everything worked.
What we are seeing in the Travis errors are exactly the opposite problem.  The 
network barclamp default deployment name is hard coded to "Default" in the DB 
migration.  When the Barclamp::DEFAULT_DEPLOYMENT_NAME constant is used while 
the unit tests are running, the I18n.t translation is failing and defaulting 
the name to "default".  As a result, the deployment lookup by name fails which 
causes the unit tests to fail.
At any rate, I can easily fix this by not using I18n.t() to get/set the name of 
the deployment, which is probably fine in this instance since the network 
barclamp can have only one deployment, and its name will most likely not be 
shown in the GUI as a result.  But, I think we have a bigger issue here in that 
translation is not working when running unit tests on Travis.  Unfortunately, I 
know very little about Travis or how translation is set up.
Can anyone help out here?

Which test failure(s) are you referring to specifically here?

Thanks,
James T.
_______________________________________________
Crowbar mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to