diff --git a/src/server/runtime.rb b/src/server/runtime.rb index 5e5febe..9efa329 100644 --- a/src/server/runtime.rb +++ b/src/server/runtime.rb @@ -148,9 +148,8 @@ def update_sr(specification) vm_id = @body[function]['VM_ID'] if vm_id.nil? - rc = 500 - error = "No VM_ID found for function #{function}" - return ProvisionEngine::Error.new(rc, error) + $logger.warning "No VM_ID found for function #{function}" + next end vm = ProvisionEngine::Function.new_with_id(vm_id, @cclient.client_oned) @@ -634,9 +633,8 @@ def functions vm_id = @body[function]['VM_ID'] if vm_id.nil? - rc = 500 - error = "No VM_ID found for function #{function}" - return ProvisionEngine::Error.new(rc, error) + $logger.warning "No VM_ID found for function #{function}" + next end vm = ProvisionEngine::Function.new_with_id(vm_id, @cclient.client_oned) diff --git a/tests/init.rb b/tests/init.rb index b042d6f..5d89f51 100644 --- a/tests/init.rb +++ b/tests/init.rb @@ -86,7 +86,9 @@ require 'log' require 'logger' + $logger = ProvisionEngine::Logger.new(conf_engine[:log], 'purge') client = ProvisionEngine::CloudClient.new(conf_engine, auth) + response = client.service_pool_get expect(response[0]).to eq(200) diff --git a/tests/testenv.sh b/tests/testenv.sh deleted file mode 100644 index b61744b..0000000 --- a/tests/testenv.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -ee_token=$1 -password=$2 -version=$3 -test_user=$4 - -if [[ ! -f /usr/bin/oned ]]; then # install minione - apt update - apt install -y ca-certificates - wget 'https://github.com/OpenNebula/minione/releases/latest/download/minione' - bash ./minione --enterprise "$ee_token" --password "$password" --yes --force --sunstone-port 9869 --version "$version" -fi - -app_components=$(onemarketapp export "Ttylinux - KVM" -d 1 "ttylinux") - -app_template=$( echo "$app_components" | head -n 2 | tail -n 1 | cut -d ':' -f 2) -app_image=$(echo "$app_components" | tail -n 1 | cut -d ':' -f 2) - - -# create user to run Github Actions tests -oneuser create "$test_user" "$password" -# create empty virtual network to force service deployment failure -echo -e NAME=\"github_actions_no_lease\"\\nVN_MAD=\"bridge\"\\nAR=[TYPE=\"ETHERNET\",SIZE=\"0\"] | onevnet create - -# configure oneflow to listen external requests - -# - name: Create VM Templates for Github Actions -# 15 github_a oneadmin Github Actions FAILED_DEPLOY 11/14 02:15:05 -# 9 github_a oneadmin Github Actions - -# "shutdown_action": "terminate-hard", - -# - name: Create Service Templates for Github Actions -# 575 github_a oneadmin FAILED_DEPLOY 11/14 02:18:12 -# 276 github_a oneadmin DenyVMTemplate 10/13 22:17:10 -# 199 github_a oneadmin Function-Data # add DAAS role after clone from Function 10/10 22:54:20 -# 63 github_a oneadmin Function - -services="Function, Function-Data DenyVMTemplate FAILED_DEPLOY" - -for s in $services; do - onetemplate clone "$app_template" "$s" - onetemplate chown "$s" "$test_user" -done - -# - name: Create Service Templates for Github Actions