summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2017-11-02 10:23:44 -0700
committerJames E. Blair <jeblair@redhat.com>2017-11-29 10:03:03 -0800
commitde0248e0d54813f6a9fd7bf87a1376e119aff182 (patch)
tree57446d39e80fef5e22be80aa74d42055c216c217 /tests
parent11925ef2170d6237b4b4bfc3a0e72cca4edab74f (diff)
downloadzuul-de0248e0d54813f6a9fd7bf87a1376e119aff182.tar.gz
Normalize daemon process handling
Adopt some of the structure from nodepool to make daemon process handling more consistent. Handle some argument parsing centrally. Change the default pid file structure to match nodepool: /var/run/zuul/<processname> Attempt to use the pidfile before daemonizing so that errors are immediately reported. Drop the config validation test since it is almost useless at this point. Change-Id: I4a9d9473ce028e0b0cd32a8c48598c1682e1c329
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_scheduler_cmd.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/unit/test_scheduler_cmd.py b/tests/unit/test_scheduler_cmd.py
deleted file mode 100644
index ee6200fe6..000000000
--- a/tests/unit/test_scheduler_cmd.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import os
-
-import testtools
-import zuul.cmd.scheduler
-
-from tests import base
-
-
-class TestSchedulerCmdArguments(testtools.TestCase):
-
- def setUp(self):
- super(TestSchedulerCmdArguments, self).setUp()
- self.app = zuul.cmd.scheduler.Scheduler()
-
- def test_test_config(self):
- conf_path = os.path.join(base.FIXTURE_DIR, 'zuul.conf')
- self.app.parse_arguments(['-t', '-c', conf_path])
- self.assertTrue(self.app.args.validate)
- self.app.read_config()
- self.assertEqual(0, self.app.test_config())