Skip to content

Commit c51a67d

Browse files
authored
Merge branch 'master' into lildude/optimise-mysql-es-restores
2 parents 4839f61 + c191684 commit c51a67d

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

script/cibuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ set -e
77
# conditional logic based on the remote version. Running the suite against
88
# different major versions ensures we're covering these conditional paths.
99
REMOTE_VERSIONS="
10-
2.11.0
11-
2.13.0
10+
2.12.0
11+
2.14.0
1212
"
1313

1414
# Enable verbose logging of ssh commands

script/release

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ def bump_version(new_version, min_version = nil, path = 'share/github-backup-uti
205205
content = File.read('bin/ghe-host-check')
206206
new_content = content.gsub(/supported_minimum_version="[0-9]\.[0-9]+\.0"/, "supported_minimum_version=\"#{min_version}\"")
207207
File.open('bin/ghe-host-check', 'w') {|file| file.puts new_content }
208+
209+
content = File.read('test/testlib.sh')
210+
new_content = content.gsub(/GHE_TEST_REMOTE_VERSION:=[0-9]\.[0-9]+\.0/,"GHE_TEST_REMOTE_VERSION:=#{new_version}")
211+
File.open('test/testlib.sh', 'w') {|file| file.puts new_content }
208212
end
209213
end
210214

@@ -384,6 +388,7 @@ if $PROGRAM_NAME == __FILE__
384388
puts `git diff --color`
385389
`git checkout -- share/github-backup-utils/version`
386390
`git checkout -- bin/ghe-host-check`
391+
`git checkout -- test/testlib.sh`
387392
exit
388393
end
389394

test/bin/ghe-es-remove-1x-indices

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ghe-fake-true

test/test-ghe-host-check.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,18 @@ end_test
5252
begin_test "ghe-host-check detects unsupported GitHub Enterprise versions"
5353
(
5454
set -e
55+
# shellcheck disable=SC2046 # Word splitting is required to populate the variables
56+
read -r bu_version_major bu_version_minor _ <<<$(ghe_parse_version $BACKUP_UTILS_VERSION)
57+
5558
! GHE_TEST_REMOTE_VERSION=11.340.36 ghe-host-check
56-
! GHE_TEST_REMOTE_VERSION=2.10.0 ghe-host-check
57-
GHE_TEST_REMOTE_VERSION=2.11.0 ghe-host-check
58-
GHE_TEST_REMOTE_VERSION=2.12.0 ghe-host-check
59-
GHE_TEST_REMOTE_VERSION=2.13.999 ghe-host-check
60-
GHE_TEST_REMOTE_VERSION=2.13.999gm1 ghe-host-check
59+
! GHE_TEST_REMOTE_VERSION=2.$((bu_version_minor-3)).0 ghe-host-check
60+
GHE_TEST_REMOTE_VERSION=2.$((bu_version_minor-2)).0 ghe-host-check
61+
GHE_TEST_REMOTE_VERSION=$BACKUP_UTILS_VERSION ghe-host-check
62+
GHE_TEST_REMOTE_VERSION=$BACKUP_UTILS_VERSION ghe-host-check
63+
GHE_TEST_REMOTE_VERSION=$bu_version_major.$bu_version_minor.999 ghe-host-check
64+
GHE_TEST_REMOTE_VERSION=$bu_version_major.$bu_version_minor.999gm1 ghe-host-check
6165
! GHE_TEST_REMOTE_VERSION=2.9999.1521793591.performancetest ghe-host-check
62-
GHE_TEST_REMOTE_VERSION=3.0.0 ghe-host-check
66+
GHE_TEST_REMOTE_VERSION=$((bu_version_major+1)).0.0 ghe-host-check
6367
)
6468
end_test
6569

0 commit comments

Comments
 (0)