@@ -1542,13 +1542,13 @@ def test_github_copy_ec_from_pr(self):
15421542
15431543 # test with only one ec in the PR (final argument is taken as a filename)
15441544 test_ec = os .path .join (self .test_prefix , 'test.eb' )
1545- args = ['--copy-ec' , '--from-pr' , '22380 ' , test_ec ]
1546- ec_pr22380 = "PySide2-5.14.2.3-GCCcore-10.2.0 .eb"
1545+ args = ['--copy-ec' , '--from-pr' , '21465 ' , test_ec ]
1546+ ec_pr21465 = "EasyBuild-4.9.4 .eb"
15471547 stdout = self .mocked_main (args )
1548- regex = re .compile (r'.*/%s copied to %s' % (ec_pr22380 , test_ec ))
1548+ regex = re .compile (r'.*/%s copied to %s' % (ec_pr21465 , test_ec ))
15491549 self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
15501550 self .assertExists (test_ec )
1551- self .assertIn ("name = 'PySide2 '" , read_file (test_ec ))
1551+ self .assertIn ("name = 'EasyBuild '" , read_file (test_ec ))
15521552 remove_file (test_ec )
15531553
15541554 def test_copy_ec_from_commit (self ):
@@ -4726,6 +4726,7 @@ def test_update_branch_github(self):
47264726 '--github-user=boegel' , # used to determine account to grab branch from (no GitHub token needed)
47274727 toy_ec ,
47284728 '--pr-commit-msg="this is just a test"' ,
4729+ '--force' , # force required because we're using --pr-commit-msg when only adding new easyconfigs
47294730 '-D' ,
47304731 ]
47314732 txt , _ = self ._run_mock_eb (args , do_build = True , raise_error = True , testing = False )
@@ -4877,19 +4878,22 @@ def test_github_new_update_pr(self):
48774878 regex = re .compile (regex , re .M )
48784879 self .assertTrue (regex .search (txt ), "Pattern '%s' found in: %s" % (regex .pattern , txt ))
48794880
4880- # modifying an existing easyconfig requires a custom PR title
4881+ # modifying an existing easyconfig requires a custom PR title;
4882+ # we need to use a sufficiently recent GCC version, since easyconfigs for old versions have been archived
48814883 gcc_ec = os .path .join (test_ecs , 'g' , 'GCC' , 'GCC-10.2.0.eb' )
4882- self .assertExists (gcc_ec )
4884+ gcc_new_ec = os .path .join (self .test_prefix , 'GCC-14.3.0.eb' )
4885+ gcc_new_txt = read_file (gcc_ec ).replace ('10.2.0' , '14.3.0' )
4886+ write_file (gcc_new_ec , gcc_new_txt )
48834887
48844888 args = [
48854889 '--new-pr' ,
48864890 '--github-user=%s' % GITHUB_TEST_ACCOUNT ,
48874891 toy_ec ,
4888- gcc_ec ,
4892+ gcc_new_ec ,
48894893 '-D' ,
48904894 ]
48914895 error_msg = "A meaningful commit message must be specified via --pr-commit-msg.*\n "
4892- error_msg += "Modified: " + os .path .basename (gcc_ec )
4896+ error_msg += "Modified: " + os .path .basename (gcc_new_ec )
48934897 self .mock_stdout (True )
48944898 self .assertErrorRegex (EasyBuildError , error_msg , self .eb_main , args , raise_error = True )
48954899 self .mock_stdout (False )
@@ -4917,7 +4921,8 @@ def test_github_new_update_pr(self):
49174921 self .assertErrorRegex (EasyBuildError , error_msg , self .eb_main , args , raise_error = True )
49184922 self .mock_stdout (False )
49194923
4920- args .append ('--pr-commit-msg="just a test"' )
4924+ # force required because we're using --pr-commit-msg when only adding new easyconfigs
4925+ args .extend (['--pr-commit-msg="just a test"' , '--force' ])
49214926 txt , _ = self ._run_mock_eb (args , do_build = True , raise_error = True , testing = False )
49224927
49234928 regexs = [
0 commit comments