~canonical-platform-qa/snappy-ecosystem-tests/fixing_ci

« back to all changes in this revision

Viewing changes to snappy_ecosystem_tests/helpers/fixture_setup.py

  • Committer: Heber Parrucci
  • Date: 2017-02-15 19:14:19 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: heber.parrucci@canonical.com-20170215191419-a3549ap02gflc8rj
Addressing review feedback regarding credentials:
Now it is read from a user config file that is outside the repo in the host machine. If that config is not found, then it reads the credentials from env variables.
The idea is to store the config with the credentials in a private repository, and then Jenkins will get it and store in the host machine when running the tests.
The same mechanism is used in ubuntu-system-tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
 
40
40
class CleanEnvironment(fixtures.Fixture):
41
 
    """Clean all env variables and restore the original values as clean up process"""
 
41
    """Clean all env variables and restore the original values as
 
42
    clean up process"""
42
43
 
43
44
    def setUp(self):
44
45
        super().setUp()
57
58
 
58
59
    def setUp(self):
59
60
        super().setUp()
60
 
        urls = CONFIG_STACK.config.get_section('%s_urls' % self.store)
 
61
        urls = CONFIG_STACK.get_section('%s_urls' % self.store)
61
62
 
62
63
        self.useFixture(fixtures.EnvironmentVariable(
63
64
            'UBUNTU_STORE_API_ROOT_URL',
74
75
 
75
76
 
76
77
class SetTestStore(fixtures.Fixture):
77
 
    """Configure the env variables for using the corresponding environment urls"""
 
78
    """Configure the env variables for using the corresponding
 
79
    environment urls"""
78
80
 
79
81
    def __init__(self):
80
82
        self.register_delay = -1