예제 #1
0
 def test_make_service_no_env(self):
     """Test make service builds the service based on os.environ"""
     myEnv = dict(os.environ)
     ## Simplest way to make sure this doesn't exist
     myEnv['NCOLONY_CONFIG'] = None
     del myEnv['NCOLONY_CONFIG']
     replaceEnvironment(self, myEnv)
     self.assertIsNone(heart.makeService())
예제 #2
0
 def test_make_service_default_name(self):
     """Test make service builds the service based on os.environ"""
     params = dict(status='.', period=10, grace=3)
     myEnv = buildEnv(params=params)
     myEnv['NCOLONY_NAME'] = 'hello'
     replaceEnvironment(self, myEnv)
     service = heart.makeService()
     checkHeartService(self, service, 'hello')
예제 #3
0
 def test_make_service_default_name(self):
     """Test make service builds the service based on os.environ"""
     params = dict(status='.', period=10, grace=3)
     myEnv = buildEnv(params=params)
     myEnv['NCOLONY_NAME'] = 'hello'
     replaceEnvironment(self, myEnv)
     service = heart.makeService()
     checkHeartService(self, service, 'hello')
예제 #4
0
 def test_make_service_no_env(self):
     """Test make service builds the service based on os.environ"""
     myEnv = dict(os.environ)
     ## Simplest way to make sure this doesn't exist
     myEnv['NCOLONY_CONFIG'] = None
     del myEnv['NCOLONY_CONFIG']
     replaceEnvironment(self, myEnv)
     self.assertIsNone(heart.makeService())
예제 #5
0
 def test_make_service_no_beatcheck(self):
     """Test make service builds the service based on os.environ"""
     myEnv = dict(os.environ)
     config = {}
     configJSON = json.dumps(config)
     myEnv = dict(os.environ)
     myEnv['NCOLONY_CONFIG'] = configJSON
     replaceEnvironment(self, myEnv)
     self.assertIsNone(heart.makeService())
예제 #6
0
 def test_make_service_no_beatcheck(self):
     """Test make service builds the service based on os.environ"""
     myEnv = dict(os.environ)
     config = {}
     configJSON = json.dumps(config)
     myEnv = dict(os.environ)
     myEnv['NCOLONY_CONFIG'] = configJSON
     replaceEnvironment(self, myEnv)
     self.assertIsNone(heart.makeService())
예제 #7
0
 def test_make_service(self):
     """Test make service builds the service based on os.environ"""
     myEnv = buildEnv()
     replaceEnvironment(self, myEnv)
     service = heart.makeService()
     checkHeartService(self, service)
예제 #8
0
 def test_make_service(self):
     """Test make service builds the service based on os.environ"""
     myEnv = buildEnv()
     replaceEnvironment(self, myEnv)
     service = heart.makeService()
     checkHeartService(self, service)