Add support for minimal MongoDB testing

This commit adds scripts for creating MongoDB image
and defines group of tests to check MongoDB instance
creation

Implements: blueprint base-mongodb-image
Change-Id: I930b6288fd5fca8f3ddd6965a5e2145f2715c24a
This commit is contained in:
Denis Makogon 2014-01-29 19:53:10 +02:00
parent 6f85df7ec1
commit db4aa87f40
9 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1 @@
Sets up a MongoDB install in the image.

View File

@ -0,0 +1,9 @@
#!/bin/sh
# CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install controller base required packages
set -e
set -o xtrace
yum -y install mongodb

View File

@ -0,0 +1,9 @@
#!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu
set -e
set -o xtrace
pip-python install pymongo

View File

@ -0,0 +1 @@
Sets up a MongoDB install in the image.

View File

@ -0,0 +1,11 @@
#!/bin/sh
# CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install controller base required packages
set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get -y install mongodb

View File

@ -0,0 +1,9 @@
#!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu
set -e
set -o xtrace
pip install pymongo

View File

@ -47,7 +47,8 @@ function cmd_build_image() {
fi
SERVICE_TYPE=$1
VALID_SERVICES='mysql percona redis cassandra couchbase'
VALID_SERVICES='mysql percona redis cassandra couchbase mongodb'
if [ `expr "$VALID_SERVICES" : ".*$SERVICE"` -eq 0 ] ; then
exclaim "You did not pass in a valid image type. Valid types are:" $VALID_SERVICES
exit 1

View File

@ -288,6 +288,9 @@ function cmd_set_datastore() {
elif [ "$DATASTORE_TYPE" == "percona" ]; then
PACKAGES=${PACKAGES:-"percona-server-server-5.5"}
VERSION="-5.5"
elif [ "$DATASTORE_TYPE" == "mongodb" ]; then
PACKAGES=${PACKAGES:-"mongodb"}
VERSION="-2.0.4"
elif [ "$DATASTORE_TYPE" == "redis" ]; then
PACKAGES=${PACKAGES:-"redis-server"}
VERSION="-2.8"

View File

@ -236,6 +236,16 @@ def import_tests():
depends_on_groups=couchbase_groups)
mongodb_groups = [
"services.initialize",
flavors.GROUP,
versions.GROUP,
instances.GROUP_START_SIMPLE,
]
proboscis.register(groups=["mongodb"],
depends_on_groups=mongodb_groups)
def run_main(test_importer):
add_support_for_localization()
@ -347,3 +357,4 @@ def run_main(test_importer):
if __name__ == "__main__":
run_main(import_tests)