diff --git a/remote_branch_checker/remote_branch_checker.sh b/remote_branch_checker/remote_branch_checker.sh index 84bde952..409e917c 100755 --- a/remote_branch_checker/remote_branch_checker.sh +++ b/remote_branch_checker/remote_branch_checker.sh @@ -12,7 +12,7 @@ # $rebasewarn: Max number of days allowed since rebase. Warning if exceeded. Defaults to 20. # $rebaseerror: Max number of days allowed since rebase. Error if exceeded. Defaults to 60. # $npmcmd: Optional, path to the npm executable (global) -# $pushremote: (optional) Remote to push the results of prechecker to. Will create branches like MDL-1234-master-shorthash +# $pushremote: (optional) Remote to push the results of prechecker to. Will create branches like MDL-1234-main-shorthash # $resettocommit: (optional) Should not be used in production runs. Reset $integrateto to a commit for testing purposes. # Don't want debugging @ start, but want exit on error diff --git a/tests/1-compare_databases.bats b/tests/1-compare_databases.bats index 3c237a8e..82c04c2b 100755 --- a/tests/1-compare_databases.bats +++ b/tests/1-compare_databases.bats @@ -24,7 +24,7 @@ setup () { export dbuser1=$LOCAL_CI_TESTS_DBUSER export dbpass1=$LOCAL_CI_TESTS_DBPASS - create_git_branch master 35d5053ba20432059b497d85e39175d356f44fb4 + create_git_branch main 35d5053ba20432059b497d85e39175d356f44fb4 } teardown () { @@ -32,14 +32,14 @@ teardown () { # Not all tests use the "compare_databases" branch. if [[ $BATS_TEST_NAME =~ "problems_are_detected" ]]; then cd $gitdir - git checkout master + git checkout main git branch -D compare_databases -q cd $OLDPWD fi; } @test "compare_databases/compare_databases.sh: missing env variables" { - export gitbranchinstalled=master + export gitbranchinstalled=main export gitbranchupgraded=MOODLE_31_STABLE export dbtype= @@ -50,22 +50,22 @@ teardown () { @test "compare_databases/compare_databases.sh: single actual (> 401_STABLE) branch runs work" { # TODO: Change this to stable branches when we have more supporting php82. - export gitbranchinstalled=master + export gitbranchinstalled=main export gitbranchupgraded=MOODLE_402_STABLE ci_run compare_databases/compare_databases.sh assert_success assert_output --partial 'Info: Origin branches: (1) MOODLE_402_STABLE' - assert_output --partial 'Info: Target branch: master' - assert_output --partial 'Info: Installing Moodle master into ci_installed_' - assert_output --partial 'Info: Comparing master and upgraded MOODLE_402_STABLE' + assert_output --partial 'Info: Target branch: main' + assert_output --partial 'Info: Installing Moodle main into ci_installed_' + assert_output --partial 'Info: Comparing main and upgraded MOODLE_402_STABLE' assert_output --partial 'Info: Installing Moodle MOODLE_402_STABLE into ci_upgraded_' - assert_output --partial 'Info: Upgrading Moodle MOODLE_402_STABLE to master into ci_upgraded_' + assert_output --partial 'Info: Upgrading Moodle MOODLE_402_STABLE to main into ci_upgraded_' assert_output --partial 'Info: Comparing databases ci_installed_' assert_output --partial 'Info: OK. No problems comparing databases ci_installed_' assert_output --partial 'Ok: Process ended without errors' refute_output --partial 'Error: Process ended with' - run [ -f $WORKSPACE/compare_databases_master_logfile.txt ] + run [ -f $WORKSPACE/compare_databases_main_logfile.txt ] assert_success } @@ -92,18 +92,18 @@ teardown () { @test "compare_databases/compare_databases.sh: multiple branch runs work" { # TODO: Change this to different stable branches when we have more supporting php82. - export gitbranchinstalled=master + export gitbranchinstalled=main export gitbranchupgraded=v4.2.1,MOODLE_402_STABLE ci_run compare_databases/compare_databases.sh assert_success assert_output --partial 'Info: Origin branches: (2) v4.2.1,MOODLE_402_STABLE' - assert_output --partial 'Info: Target branch: master' - assert_output --partial 'Info: Comparing master and upgraded v4.2.1' - assert_output --partial 'Info: Comparing master and upgraded MOODLE_402_STABLE' + assert_output --partial 'Info: Target branch: main' + assert_output --partial 'Info: Comparing main and upgraded v4.2.1' + assert_output --partial 'Info: Comparing main and upgraded MOODLE_402_STABLE' assert_output --partial 'Ok: Process ended without errors' refute_output --partial 'Error: Process ended with' - run [ -f $WORKSPACE/compare_databases_master_logfile.txt ] + run [ -f $WORKSPACE/compare_databases_main_logfile.txt ] assert_success } diff --git a/tests/1-illegal_whitespace.bats b/tests/1-illegal_whitespace.bats index 28df19f7..0c87523a 100755 --- a/tests/1-illegal_whitespace.bats +++ b/tests/1-illegal_whitespace.bats @@ -54,7 +54,7 @@ teardown () { uit="$tmpdir/example space" mkdir -p "${uit}" export gitdir="${uit}" - export gitbranch="master" + export gitbranch="main" ci_run illegal_whitespace/illegal_whitespace.sh assert_success } diff --git a/tests/1-travis-branch-checker.bats b/tests/1-travis-branch-checker.bats index 3401a659..78bba4dd 100755 --- a/tests/1-travis-branch-checker.bats +++ b/tests/1-travis-branch-checker.bats @@ -10,7 +10,7 @@ load libs/shared_setup ci_run_php travis/check_branch_status.php --repository=https://github.com/moodlehq/moodle-local_ci assert_failure - ci_run_php travis/check_branch_status.php --branch=master + ci_run_php travis/check_branch_status.php --branch=main assert_failure } @@ -41,7 +41,7 @@ load libs/shared_setup @test "travis/check_branch_status.php: not github repo" { # Travis only works with github repos, so skip non-github ones - ci_run_php travis/check_branch_status.php --repository=git://git.moodle.org/moodle.git --branch=master + ci_run_php travis/check_branch_status.php --repository=git://git.moodle.org/moodle.git --branch=main assert_success assert_output 'SKIP: Skipping checks. git://git.moodle.org/moodle.git Not a github repo.' } diff --git a/tests/3-git_sync_two_branches.bats b/tests/3-git_sync_two_branches.bats index 1deaf0f7..cacfdd28 100755 --- a/tests/3-git_sync_two_branches.bats +++ b/tests/3-git_sync_two_branches.bats @@ -27,8 +27,8 @@ setup() { # Set the rest of env variables needed for the script. export gitremote=local_ci_tests - # Let's checkout master, so we test everything without any local checkout of the branches. - git checkout master --quiet + # Let's checkout main, so we test everything without any local checkout of the branches. + git checkout main --quiet cd $OLDPWD } diff --git a/tests/3-prepare_npm_stuff.bats b/tests/3-prepare_npm_stuff.bats index b31f360d..c32c93e8 100755 --- a/tests/3-prepare_npm_stuff.bats +++ b/tests/3-prepare_npm_stuff.bats @@ -3,7 +3,7 @@ load libs/shared_setup setup () { - create_git_branch master origin/master + create_git_branch main origin/main rm -fr $gitdir/node_modules rm -fr $gitdir/npm-shrinkwrap.json }