Merge lp:~clint-fewbar/pyjuju/fix-tests-without-aws-access-key-id into lp:pyjuju

Proposed by Clint Byrum
Status: Rejected
Rejected by: Kapil Thangavelu
Proposed branch: lp:~clint-fewbar/pyjuju/fix-tests-without-aws-access-key-id
Merge into: lp:pyjuju
Diff against target: 12 lines (+1/-1)
1 file modified
ensemble/environment/tests/test_config.py (+1/-1)
To merge this branch: bzr merge lp:~clint-fewbar/pyjuju/fix-tests-without-aws-access-key-id
Reviewer Review Type Date Requested Status
Gustavo Niemeyer Needs Fixing
Review via email: mp+73612@code.launchpad.net

Description of the change

Trivial change to make sure tests do not fail because of missing AWS_* variables.

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Looks good, thanks Clint.

review: Approve
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Actually, that doesn't look entirely ok. One issue we have to solve before merging this:

[1]

Which tests are failing, and why?

Changing EnvironmentsConfigTestBase to set the AWS variables at _all_ times is creating
an unrealistic environment for the tests to run under. The environment itself should
generally work without these variables being set.

I'm happy to set the variables in specific tests where it's clear that mocking the
values is desired, but otherwise if the code is requiring the AWS varaibles to be set
in situations it shouldn't, it is the code that should be fixed.

review: Needs Fixing
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I think I see the problem a little clearer now, and the real issue is that there are actually bugs in some assumptions made in the EC2 provider about how txaws works.. so this will need more thought. For now I'll keep this patch in the package build steps so we can run all the other tests, but the bug itself is perhaps a symptom of something much deeper.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

marking this merge as abandonded, there are about 3 config tests that fail without this env var set, we should go ahead and set them in the relevant tests, clearing out of the lp review queue.

Unmerged revisions

337. By Clint Byrum

override AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to prevent txaws from raising errors

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ensemble/environment/tests/test_config.py'
2--- ensemble/environment/tests/test_config.py 2011-08-09 19:25:58 +0000
3+++ ensemble/environment/tests/test_config.py 2011-09-01 00:19:16 +0000
4@@ -47,7 +47,7 @@
5 yield super(EnvironmentsConfigTestBase, self).setUp()
6 self.old_home = os.environ.get("HOME")
7 self.tmp_home = self.makeDir()
8- self.change_environment(HOME=self.tmp_home)
9+ self.change_environment(HOME=self.tmp_home, AWS_ACCESS_KEY_ID="foo", AWS_SECRET_ACCESS_KEY="bar")
10 self.default_path = os.path.join(self.tmp_home,
11 ".ensemble/environments.yaml")
12 self.other_path = os.path.join(self.tmp_home,

Subscribers

People subscribed via source and target branches

to status/vote changes: