Skip to content

Commit f147183

Browse files
committed
Skip ES backup / restore tests under v2.x remote appliances
We'll wrap around and add support for backup / restore of the new ES version in a follow up PR.
1 parent d25a156 commit f147183

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

test/test-ghe-backup.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ begin_test "ghe-backup first snapshot"
8484
# verify all pages data was transferred
8585
diff -ru "$GHE_REMOTE_DATA_USER_DIR/pages" "$GHE_DATA_DIR/current/pages"
8686

87-
# verify all ES data was transferred
88-
diff -ru "$GHE_REMOTE_DATA_USER_DIR/elasticsearch" "$GHE_DATA_DIR/current/elasticsearch"
87+
# TODO ES backup not yet supported under 2.x VM
88+
if [ "$GHE_VERSION_MAJOR" -eq 1 ]; then
89+
# verify all ES data was transferred
90+
diff -ru "$GHE_REMOTE_DATA_USER_DIR/elasticsearch" "$GHE_DATA_DIR/current/elasticsearch"
91+
fi
8992
)
9093
end_test
9194

@@ -143,8 +146,11 @@ begin_test "ghe-backup subsequent snapshot"
143146
# verify all pages data was transferred
144147
diff -ru "$GHE_REMOTE_DATA_USER_DIR/pages" "$GHE_DATA_DIR/current/pages"
145148

146-
# verify all ES data was transferred
147-
diff -ru "$GHE_REMOTE_DATA_USER_DIR/elasticsearch" "$GHE_DATA_DIR/current/elasticsearch"
149+
# TODO ES backup not yet supported under 2.x VM
150+
if [ "$GHE_VERSION_MAJOR" -eq 1 ]; then
151+
# verify all ES data was transferred
152+
diff -ru "$GHE_REMOTE_DATA_USER_DIR/elasticsearch" "$GHE_DATA_DIR/current/elasticsearch"
153+
fi
148154
)
149155
end_test
150156

@@ -169,8 +175,10 @@ begin_test "ghe-backup tarball strategy"
169175
# check repositories tarball data
170176
[ "$(cat "$GHE_DATA_DIR/current/repositories.tar")" = "fake ghe-export-repositories data" ]
171177

172-
# check ES tarball data
173-
[ "$(cat "$GHE_DATA_DIR/current/elasticsearch.tar")" = "fake ghe-export-es-indices data" ]
178+
# check ES tarball data. Supported under v1.x VMs only.
179+
if [ "$GHE_VERSION_MAJOR" -eq 1 ]; then
180+
[ "$(cat "$GHE_DATA_DIR/current/elasticsearch.tar")" = "fake ghe-export-es-indices data" ]
181+
fi
174182

175183
# check that repositories directory doesnt exist
176184
[ ! -d "$GHE_DATA_DIR/current/repositories" ]

0 commit comments

Comments
 (0)