File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -235,9 +235,6 @@ def __init__(self, cname):
235235        artifacts .upload_from_directory (env .cname , env .tmp_path )
236236
237237
238- @pytest .mark .skip ( 
239-     reason = "needs fix, see  https://github.com/gardenlinux/python-gardenlinux-lib/pull/236"  
240- ) 
241238def  test_upload_from_directory_invalid_artifact_name (s3_setup ):
242239    """ 
243240    Raise RuntimeError if artifact file does not start with cname. 
@@ -252,10 +249,12 @@ def test_upload_from_directory_invalid_artifact_name(s3_setup):
252249
253250    artifacts  =  S3Artifacts (env .bucket_name )
254251
255-     # Act / Assert 
256-     with  pytest .raises (RuntimeError , match = "does not start with cname" ):
257-         artifacts .upload_from_directory (env .cname , env .tmp_path )
252+     # Act 
253+     artifacts .upload_from_directory (env .cname , env .tmp_path )
258254
255+     # Assert 
256+     bucket  =  env .s3 .Bucket (env .bucket_name )
257+     assert  len (list (bucket .objects .filter (Prefix = f"meta/singles/{ env .cname }  " ))) ==  1 
259258
260259def  test_upload_from_directory_commit_mismatch_raises (s3_setup ):
261260    """Raise RuntimeError when commit ID is not matching with cname.""" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments