setup target_host for tests in test main class
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								aedb3669c7
							
						
					
				
			
			
				commit
				
					
						28bf0c3ed8
					
				
			
		
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -35,6 +35,8 @@ class CdistTestCase(unittest.TestCase):
 | 
				
			||||||
    remote_exec = os.path.join(global_fixtures_dir, "remote", "exec")
 | 
					    remote_exec = os.path.join(global_fixtures_dir, "remote", "exec")
 | 
				
			||||||
    remote_copy = os.path.join(global_fixtures_dir, "remote", "copy")
 | 
					    remote_copy = os.path.join(global_fixtures_dir, "remote", "copy")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    target_host = 'cdisttesthost'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def mkdtemp(self, **kwargs):
 | 
					    def mkdtemp(self, **kwargs):
 | 
				
			||||||
        return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs)
 | 
					        return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,6 @@ my_dir = op.abspath(op.dirname(__file__))
 | 
				
			||||||
fixtures = op.join(my_dir, 'fixtures')
 | 
					fixtures = op.join(my_dir, 'fixtures')
 | 
				
			||||||
conf_dir = op.join(fixtures, 'conf')
 | 
					conf_dir = op.join(fixtures, 'conf')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
class EmulatorTestCase(test.CdistTestCase):
 | 
					class EmulatorTestCase(test.CdistTestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def setUp(self):
 | 
					    def setUp(self):
 | 
				
			||||||
| 
						 | 
					@ -48,7 +47,6 @@ class EmulatorTestCase(test.CdistTestCase):
 | 
				
			||||||
        self.temp_dir = self.mkdtemp()
 | 
					        self.temp_dir = self.mkdtemp()
 | 
				
			||||||
        handle, self.script = self.mkstemp(dir=self.temp_dir)
 | 
					        handle, self.script = self.mkstemp(dir=self.temp_dir)
 | 
				
			||||||
        os.close(handle)
 | 
					        os.close(handle)
 | 
				
			||||||
        self.target_host = 'localhost'
 | 
					 | 
				
			||||||
        out_path = self.temp_dir
 | 
					        out_path = self.temp_dir
 | 
				
			||||||
        self.local = local.Local(
 | 
					        self.local = local.Local(
 | 
				
			||||||
            target_host=self.target_host,
 | 
					            target_host=self.target_host,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue