File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed 
modules/kafka/testcontainers/kafka Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ import  os .path 
12import  tarfile 
23import  time 
34from  io  import  BytesIO 
@@ -21,7 +22,7 @@ class RedpandaContainer(DockerContainer):
2122            ...    connection = redpanda.get_bootstrap_server() 
2223    """ 
2324
24-     TC_START_SCRIPT  =  "/tc-start.sh" 
25+     TC_START_SCRIPT  =  "/var/lib/redpanda/ tc-start.sh" 
2526
2627    def  __init__ (
2728        self ,
@@ -74,9 +75,10 @@ def start(self, timeout=10) -> "RedpandaContainer":
7475
7576    def  create_file (self , content : bytes , path : str ) ->  None :
7677        with  BytesIO () as  archive , tarfile .TarFile (fileobj = archive , mode = "w" ) as  tar :
77-             tarinfo  =  tarfile .TarInfo (name = path )
78+             dirname , basename  =  os .path .split (path )
79+             tarinfo  =  tarfile .TarInfo (name = basename )
7880            tarinfo .size  =  len (content )
7981            tarinfo .mtime  =  time .time ()
8082            tar .addfile (tarinfo , BytesIO (content ))
8183            archive .seek (0 )
82-             self .get_wrapped_container ().put_archive ("/" , archive )
84+             self .get_wrapped_container ().put_archive (dirname , archive )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments