Skip to content

Commit 5093b2a

Browse files
authored
Merge pull request #139 from brianhlin/sw3473_setup_personal_condor
Setup personal condor (SOFTWARE-3473)
2 parents 1c96a46 + c7cb6c1 commit 5093b2a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

osgtest/tests/test_10_condor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
from os.path import join
2+
13
import osgtest.library.core as core
4+
import osgtest.library.files as files
25
import osgtest.library.condor as condor
36
import osgtest.library.osgunittest as osgunittest
47
import osgtest.library.service as service
58

9+
personal_condor_config = '''
10+
DAEMON_LIST = COLLECTOR, MASTER, NEGOTIATOR, SCHEDD, STARTD
11+
CONDOR_HOST = $(FULL_HOSTNAME)
12+
'''
13+
614
class TestStartCondor(osgunittest.OSGTestCase):
715

816
def test_01_start_condor(self):
@@ -15,6 +23,9 @@ def test_01_start_condor(self):
1523
core.state['condor.running-service'] = True
1624
return
1725

26+
core.config['condor.personal_condor'] = join(condor.config_val('LOCAL_CONFIG_DIR'), '99-personal-condor.conf')
27+
files.write(core.config['condor.personal_condor'], personal_condor_config, owner='condor', chmod=0o644)
28+
1829
core.config['condor.collectorlog_stat'] = core.get_stat(core.config['condor.collectorlog'])
1930

2031
service.check_start('condor')

osgtest/tests/test_89_condor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import osgtest.library.core as core
2+
import osgtest.library.files as files
23
import osgtest.library.service as service
34
import osgtest.library.osgunittest as osgunittest
45

56
class TestStopCondor(osgunittest.OSGTestCase):
67

78
def test_01_stop_condor(self):
89
core.skip_ok_unless_installed('condor')
9-
self.skip_ok_if(core.state['condor.started-service'] == False, 'did not start server')
10+
self.skip_ok_unless(core.state['condor.started-service'], 'did not start server')
1011
service.check_stop('condor')
12+
files.restore(core.config['condor.personal_condor'], 'condor')
1113
core.state['condor.running-service'] = False

0 commit comments

Comments
 (0)