1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

[Travis] Add support for GOCA tests

This commit is contained in:
Tino Vazquez 2019-02-28 19:31:40 +01:00
parent a8f7207cfa
commit 7e14b181e4
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE
3 changed files with 32 additions and 3 deletions

View File

@ -17,7 +17,7 @@
dist: xenial
language: generic
before_install:
- sudo apt-get install -y libsystemd-dev bash-completion bison debhelper default-jdk flex javahelper libmysql++-dev libsqlite3-dev libssl-dev libws-commons-util-java libxml2-dev libxmlrpc3-client-java libxmlrpc3-common-java libxslt1-dev libcurl4-openssl-dev ruby scons libxmlrpc-c++8-dev npm libvncserver-dev
- sudo apt-get install -y libsystemd-dev bash-completion bison debhelper default-jdk flex javahelper libmysql++-dev libsqlite3-dev libssl-dev libws-commons-util-java libxml2-dev libxmlrpc3-client-java libxmlrpc3-common-java libxslt1-dev libcurl4-openssl-dev ruby scons libxmlrpc-c++8-dev npm libvncserver-dev qemu-utils
- gem install rubocop
- sudo npm install -g bower
- sudo npm install -g grunt

View File

@ -23,10 +23,14 @@ mkdir $HOME/.one
echo "oneadmin:opennebula" > $HOME/.one/one_auth
# Install gems
/usr/share/one/install_gems --yes
sudo /usr/share/one/install_gems --yes
# Enable dummy drivers
sudo chmod o+w /etc/one/oned.conf
echo 'IM_MAD = [ NAME="dummy", SUNSTONE_NAME="Testing", EXECUTABLE="one_im_dummy"]' >> /etc/one/oned.conf
echo 'VM_MAD = [ NAME="dummy", SUNSTONE_NAME="Testing", EXECUTABLE="one_vmm_dummy",TYPE="xml" ]' >> /etc/one/oned.conf
# start oned
one start
# check it's up

25
.travis/tests/05-goca.sh Executable file
View File

@ -0,0 +1,25 @@
# -------------------------------------------------------------------------- #
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
# walk to goca path
cd src/oca/go/src/goca
# install dependencies
go get
go get gopkg.in/check.v1
# run tests
go test