summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Vagrantfile16
-rw-r--r--qa/vagrant/pom.xml2
-rw-r--r--qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats16
-rw-r--r--qa/vagrant/src/test/resources/packaging/scripts/packaging_test_utils.bash2
4 files changed, 27 insertions, 9 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 29822177b7..4c86d027a0 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -68,11 +68,16 @@ Vagrant.configure(2) do |config|
config.vm.box = "boxcutter/fedora22"
dnf_common config
end
+ config.vm.define "opensuse-13" do |config|
+ config.vm.box = "chef/opensuse-13"
+ config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_opensuse-13.2-x86_64_chef-provisionerless.box"
+ suse_common config
+ end
# Switch the default share for the project root from /vagrant to
# /elasticsearch because /vagrant is confusing when there is a project inside
# the elasticsearch project called vagrant....
config.vm.synced_folder ".", "/vagrant", disabled: true
- config.vm.synced_folder "", "/elasticsearch"
+ config.vm.synced_folder ".", "/elasticsearch"
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
@@ -150,6 +155,14 @@ def dnf_common(config)
end
end
+def suse_common(config)
+ provision(config,
+ update_command: "zypper --non-interactive list-updates",
+ update_tracking_file: "/var/cache/zypp/packages/last_update",
+ install_command: "zypper --non-interactive --quiet install --no-recommends",
+ java_package: "java-1_8_0-openjdk-devel")
+end
+
# Register the main box provisioning script.
# @param config Vagrant's config object. Required.
# @param update_command [String] The command used to update the package
@@ -194,6 +207,7 @@ def provision(config,
#{extra}
installed java || install #{java_package}
+ ensure tar
ensure curl
ensure unzip
diff --git a/qa/vagrant/pom.xml b/qa/vagrant/pom.xml
index af0ae73353..1c368726c4 100644
--- a/qa/vagrant/pom.xml
+++ b/qa/vagrant/pom.xml
@@ -21,7 +21,7 @@
<testCommand>sudo bats $BATS/${testScripts}</testCommand>
<allDebBoxes>precise, trusty, vivid, jessie</allDebBoxes>
- <allRpmBoxes>centos-6, centos-7, fedora-22, oel-7</allRpmBoxes>
+ <allRpmBoxes>centos-6, centos-7, oel-7, fedora-22, opensuse-13</allRpmBoxes>
<defaultDebBoxes>trusty</defaultDebBoxes>
<defaultRpmBoxes>centos-7</defaultRpmBoxes>
diff --git a/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats b/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats
index 77e8d80736..25685a86dd 100644
--- a/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats
+++ b/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats
@@ -99,23 +99,27 @@ setup() {
@test "[SYSTEMD] stop (running)" {
systemctl stop elasticsearch.service
+}
+@test "[SYSTEMD] status (stopping)" {
run systemctl status elasticsearch.service
- [ "$status" -eq 3 ] || "Expected exit code 3 meaning stopped"
+ # I'm not sure why suse exits 0 here, but it does
+ if [ ! -e /etc/SuSE-release ]; then
+ [ "$status" -eq 3 ] || "Expected exit code 3 meaning stopped but got $status"
+ fi
echo "$output" | grep "Active:" | grep "inactive"
}
@test "[SYSTEMD] stop (stopped)" {
systemctl stop elasticsearch.service
-
- run systemctl status elasticsearch.service
- [ "$status" -eq 3 ] || "Expected exit code 3 meaning stopped"
- echo "$output" | grep "Active:" | grep "inactive"
}
@test "[SYSTEMD] status (stopped)" {
run systemctl status elasticsearch.service
- [ "$status" -eq 3 ] || "Expected exit code 3 meaning stopped"
+ # I'm not sure why suse exits 0 here, but it does
+ if [ ! -e /etc/SuSE-release ]; then
+ [ "$status" -eq 3 ] || "Expected exit code 3 meaning stopped but got $status"
+ fi
echo "$output" | grep "Active:" | grep "inactive"
}
diff --git a/qa/vagrant/src/test/resources/packaging/scripts/packaging_test_utils.bash b/qa/vagrant/src/test/resources/packaging/scripts/packaging_test_utils.bash
index ff7255c541..78ab3519d0 100644
--- a/qa/vagrant/src/test/resources/packaging/scripts/packaging_test_utils.bash
+++ b/qa/vagrant/src/test/resources/packaging/scripts/packaging_test_utils.bash
@@ -414,7 +414,7 @@ wait_for_elasticsearch_status() {
local desiredStatus=${1:-green}
echo "Making sure elasticsearch is up..."
- wget -O - --retry-connrefused --waitretry=1 --timeout=60 http://localhost:9200 || {
+ wget -O - --retry-connrefused --waitretry=1 --timeout=60 --tries 60 http://localhost:9200 || {
echo "Looks like elasticsearch never started. Here is its log:"
if [ -r "/tmp/elasticsearch/elasticsearch.pid" ]; then
cat /tmp/elasticsearch/log/elasticsearch.log