forked from ungleich-public/cdist
		
	introduce config.link_emulator() to be called from test
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								1d981200c8
							
						
					
				
			
			
				commit
				
					
						ccbd0f1d84
					
				
			
		
					 2 changed files with 8 additions and 4 deletions
				
			
		|  | @ -107,15 +107,18 @@ class Config: | ||||||
|             cdist.exec.run_or_fail(remote_cmd, stdout=output_fd, remote_prefix=self.remote_prefix) |             cdist.exec.run_or_fail(remote_cmd, stdout=output_fd, remote_prefix=self.remote_prefix) | ||||||
|             output_fd.close() |             output_fd.close() | ||||||
| 
 | 
 | ||||||
|  |     def link_emulator(self): | ||||||
|  |         """Link emulator to types""" | ||||||
|  |         cdist.emulator.link(self.exec_path, | ||||||
|  |             self.path.bin_dir, self.path.list_types()) | ||||||
|  | 
 | ||||||
|     def init_deploy(self): |     def init_deploy(self): | ||||||
|         """Ensure the base directories are cleaned up""" |         """Ensure the base directories are cleaned up""" | ||||||
|         log.debug("Creating clean directory structure") |         log.debug("Creating clean directory structure") | ||||||
| 
 | 
 | ||||||
|         self.path.remove_remote_dir(cdist.path.REMOTE_BASE_DIR) |         self.path.remove_remote_dir(cdist.path.REMOTE_BASE_DIR) | ||||||
|         self.path.remote_mkdir(cdist.path.REMOTE_BASE_DIR) |         self.path.remote_mkdir(cdist.path.REMOTE_BASE_DIR) | ||||||
| 
 |         self.link_emulator() | ||||||
|         cdist.emulator.link(self.exec_path, |  | ||||||
|             self.path.bin_dir, self.path.list_types()) |  | ||||||
| 
 | 
 | ||||||
|     def run_initial_manifest(self): |     def run_initial_manifest(self): | ||||||
|         """Run the initial manifest""" |         """Run the initial manifest""" | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								test.py
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								test.py
									
										
									
									
									
								
							|  | @ -90,6 +90,7 @@ class Config(unittest.TestCase): | ||||||
|         self.config = cdist.config.Config("localhost", |         self.config = cdist.config.Config("localhost", | ||||||
|                             initial_manifest=self.init_manifest, |                             initial_manifest=self.init_manifest, | ||||||
|                             exec_path=cdist_exec_path) |                             exec_path=cdist_exec_path) | ||||||
|  |         self.config.link_emulator() | ||||||
| 
 | 
 | ||||||
|     def test_initial_manifest_different_parameter(self): |     def test_initial_manifest_different_parameter(self): | ||||||
|         manifest_fd = open(self.init_manifest, "w") |         manifest_fd = open(self.init_manifest, "w") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue