Remove boilerplate zuul.conf from test fixtures

Change-Id: I288f17e0a5242545b4a1841e99008e23e1f154b8
This commit is contained in:
James E. Blair
2015-12-22 15:32:02 -08:00
parent d8e778fdb0
commit 2a629ec970
5 changed files with 5 additions and 111 deletions

View File

@@ -1058,6 +1058,8 @@ class ZuulTestCase(BaseTestCase):
"""Per test config object. Override to set different config."""
self.config = ConfigParser.ConfigParser()
self.config.read(os.path.join(FIXTURE_DIR, self.config_file))
if hasattr(self, 'tenant_config_file'):
self.config.set('zuul', 'tenant_config', self.tenant_config_file)
def setup_repos(self):
"""Subclasses can override to manipulate repos before tests"""

View File

@@ -1,36 +0,0 @@
[gearman]
server=127.0.0.1
[zuul]
tenant_config=config/in-repo/main.yaml
url_pattern=http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}
job_name_in_report=true
[merger]
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[swift]
authurl=https://identity.api.example.org/v2.0/
user=username
key=password
tenant_name=" "
default_container=logs
region_name=EXP
logserver_prefix=http://logs.example.org/server.app/
[connection gerrit]
driver=gerrit
server=review.example.com
user=jenkins
sshkey=none
[connection smtp]
driver=smtp
server=localhost
port=25
default_from=zuul@example.com
default_to=you@example.com

View File

@@ -1,36 +0,0 @@
[gearman]
server=127.0.0.1
[zuul]
tenant_config=config/multi-tenant/main.yaml
url_pattern=http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}
job_name_in_report=true
[merger]
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[swift]
authurl=https://identity.api.example.org/v2.0/
user=username
key=password
tenant_name=" "
default_container=logs
region_name=EXP
logserver_prefix=http://logs.example.org/server.app/
[connection gerrit]
driver=gerrit
server=review.example.com
user=jenkins
sshkey=none
[connection smtp]
driver=smtp
server=localhost
port=25
default_from=zuul@example.com
default_to=you@example.com

View File

@@ -1,36 +0,0 @@
[gearman]
server=127.0.0.1
[zuul]
tenant_config=config/project-template/main.yaml
url_pattern=http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}
job_name_in_report=true
[merger]
git_dir=/tmp/zuul-test/git
git_user_email=zuul@example.com
git_user_name=zuul
zuul_url=http://zuul.example.com/p
[swift]
authurl=https://identity.api.example.org/v2.0/
user=username
key=password
tenant_name=" "
default_container=logs
region_name=EXP
logserver_prefix=http://logs.example.org/server.app/
[connection gerrit]
driver=gerrit
server=review.example.com
user=jenkins
sshkey=none
[connection smtp]
driver=smtp
server=localhost
port=25
default_from=zuul@example.com
default_to=you@example.com

View File

@@ -29,7 +29,7 @@ logging.basicConfig(level=logging.DEBUG,
class TestMultipleTenants(ZuulTestCase):
# A temporary class to hold new tests while others are disabled
config_file = 'config/multi-tenant/zuul.conf'
tenant_config_file = 'config/multi-tenant/main.yaml'
def test_multiple_tenants(self):
A = self.fake_gerrit.addFakeChange('org/project1', 'master', 'A')
@@ -67,7 +67,7 @@ class TestMultipleTenants(ZuulTestCase):
class TestInRepoConfig(ZuulTestCase):
# A temporary class to hold new tests while others are disabled
config_file = 'config/in-repo/zuul.conf'
tenant_config_file = 'config/in-repo/main.yaml'
def setup_repos(self):
in_repo_conf = textwrap.dedent(
@@ -100,7 +100,7 @@ class TestInRepoConfig(ZuulTestCase):
class TestProjectTemplate(ZuulTestCase):
config_file = 'config/project-template/zuul.conf'
tenant_config_file = 'config/project-template/main.yaml'
def test(self):
A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')