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())
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')
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())
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)