[Notes] [Git][BuildStream/buildstream][gokcennurlu/remote_url_override_push_error] Fix tests



Title: GitLab

Gökçen Nurlu pushed to branch gokcennurlu/remote_url_override_push_error at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • tests/artifactcache/pull.py
    ... ... @@ -146,7 +146,8 @@ def _test_pull(user_config_file, project_dir, artifact_dir,
    146 146
         element = project.load_elements([element_name])[0]
    
    147 147
     
    
    148 148
         # Manually setup the CAS remote
    
    149
    -    cas.setup_remotes(use_config=True)
    
    149
    +    remotes = cas.get_remotes_from_projects()
    
    150
    +    cas.setup_remotes(remotes=remotes)
    
    150 151
     
    
    151 152
         if cas.has_push_remotes(element=element):
    
    152 153
             # Push the element's artifact
    
    ... ... @@ -284,7 +285,8 @@ def _test_push_tree(user_config_file, project_dir, artifact_dir, artifact_digest
    284 285
         cas = artifactcache.cas
    
    285 286
     
    
    286 287
         # Manually setup the CAS remote
    
    287
    -    artifactcache.setup_remotes(use_config=True)
    
    288
    +    remotes = artifactcache.get_remotes_from_projects()
    
    289
    +    artifactcache.setup_remotes(remotes=remotes)
    
    288 290
     
    
    289 291
         if artifactcache.has_push_remotes():
    
    290 292
             directory = remote_execution_pb2.Directory()
    
    ... ... @@ -319,7 +321,8 @@ def _test_pull_tree(user_config_file, project_dir, artifact_dir, artifact_digest
    319 321
         cas = context.artifactcache
    
    320 322
     
    
    321 323
         # Manually setup the CAS remote
    
    322
    -    cas.setup_remotes(use_config=True)
    
    324
    +    remotes = cas.get_remotes_from_projects()
    
    325
    +    cas.setup_remotes(remotes=remotes)
    
    323 326
     
    
    324 327
         if cas.has_push_remotes():
    
    325 328
             # Pull the artifact using the Tree object
    

  • tests/artifactcache/push.py
    ... ... @@ -125,8 +125,8 @@ def _test_push(user_config_file, project_dir, artifact_dir,
    125 125
         element = project.load_elements([element_name])[0]
    
    126 126
     
    
    127 127
         # Manually setup the CAS remote
    
    128
    -    cas.setup_remotes(use_config=True)
    
    129
    -    cas.initialize_remotes()
    
    128
    +    remotes = cas.get_remotes_from_projects()
    
    129
    +    cas.setup_remotes(remotes=remotes)
    
    130 130
     
    
    131 131
         if cas.has_push_remotes(element=element):
    
    132 132
             # Push the element's artifact
    
    ... ... @@ -185,8 +185,8 @@ def test_push_directory(cli, tmpdir, datafiles):
    185 185
             assert artifactcache.contains(element, element_key)
    
    186 186
     
    
    187 187
             # Manually setup the CAS remote
    
    188
    -        artifactcache.setup_remotes(use_config=True)
    
    189
    -        artifactcache.initialize_remotes()
    
    188
    +        remotes = cas.get_remotes_from_projects()
    
    189
    +        cas.setup_remotes(remotes=remotes)
    
    190 190
             assert artifactcache.has_push_remotes(element=element)
    
    191 191
     
    
    192 192
             # Recreate the CasBasedDirectory object from the cached artifact
    
    ... ... @@ -231,8 +231,8 @@ def _test_push_directory(user_config_file, project_dir, artifact_dir, artifact_d
    231 231
         cas = context.artifactcache
    
    232 232
     
    
    233 233
         # Manually setup the CAS remote
    
    234
    -    cas.setup_remotes(use_config=True)
    
    235
    -    cas.initialize_remotes()
    
    234
    +    remotes = cas.get_remotes_from_projects()
    
    235
    +    cas.setup_remotes(remotes=remotes)
    
    236 236
     
    
    237 237
         if cas.has_push_remotes():
    
    238 238
             # Create a CasBasedDirectory from local CAS cache content
    
    ... ... @@ -307,8 +307,8 @@ def _test_push_message(user_config_file, project_dir, artifact_dir, queue):
    307 307
         cas = context.artifactcache
    
    308 308
     
    
    309 309
         # Manually setup the CAS remote
    
    310
    -    cas.setup_remotes(use_config=True)
    
    311
    -    cas.initialize_remotes()
    
    310
    +    remotes = cas.get_remotes_from_projects()
    
    311
    +    cas.setup_remotes(remotes=remotes)
    
    312 312
     
    
    313 313
         if cas.has_push_remotes():
    
    314 314
             # Create an example message object
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]