Remove boilerplate zuul.conf from test fixtures
Change-Id: I288f17e0a5242545b4a1841e99008e23e1f154b8
diff --git a/tests/base.py b/tests/base.py
index 8efdfd1..e1d23eb 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1058,6 +1058,8 @@
"""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"""
diff --git a/tests/fixtures/config/in-repo/zuul.conf b/tests/fixtures/config/in-repo/zuul.conf
deleted file mode 100644
index 1910084..0000000
--- a/tests/fixtures/config/in-repo/zuul.conf
+++ /dev/null
@@ -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
diff --git a/tests/fixtures/config/multi-tenant/zuul.conf b/tests/fixtures/config/multi-tenant/zuul.conf
deleted file mode 100644
index 346450e..0000000
--- a/tests/fixtures/config/multi-tenant/zuul.conf
+++ /dev/null
@@ -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
diff --git a/tests/fixtures/config/project-template/zuul.conf b/tests/fixtures/config/project-template/zuul.conf
deleted file mode 100644
index 67f3d2c..0000000
--- a/tests/fixtures/config/project-template/zuul.conf
+++ /dev/null
@@ -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
diff --git a/tests/test_v3.py b/tests/test_v3.py
index b86b630..8425383 100644
--- a/tests/test_v3.py
+++ b/tests/test_v3.py
@@ -29,7 +29,7 @@
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 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 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')