Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Vavala <bruno.vavala@intel.com>
  • Loading branch information
bvavala committed Mar 14, 2024
1 parent d669b94 commit e27216e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
3 changes: 1 addition & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ DOCKER_DIR ?= ${PDO_SOURCE_ROOT}/docker
DOCKER_USERNAME = $(LOGNAME)
DOCKER_BUILDARGS += --build-arg UID=$(PDO_USER_UID)
DOCKER_BUILDARGS += --build-arg GID=$(PDO_GROUP_UID)
DOCKER_BUILDARGS += --build-arg SGX_MODE=$(SGX_MODE)
DOCKER_ARGS = $(DOCKER_BUILDARGS)

IMAGES=base client services_base services ccf_base ccf
Expand Down Expand Up @@ -131,7 +130,7 @@ TEST_FILES += -f test.yaml
DOCKER_COMPOSE_COMMAND=docker-compose

ifeq ($(SGX_MODE),HW)
TEST_FILES += -f test-sgx-hw-mode.yaml
TEST_FILES += -f test-sgx.yaml
SGX_DEVICE_PATH=$(shell if [ -e "/dev/isgx" ]; \
then echo "/dev/isgx"; \
elif [ -e "/dev/sgx/enclave" ]; \
Expand Down
23 changes: 23 additions & 0 deletions docker/test-sgx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2023 Intel Corporation
#
# 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.
# ------------------------------------------------------------------------------
version: "3.4"

services:
services_container:
volumes:
- /var/run/aesmd:/var/run/aesmd
devices:
- ${SGX_DEVICE_PATH:-/dev/isgx}:${SGX_DEVICE_PATH:-/dev/isgx}

2 changes: 1 addition & 1 deletion docker/tools/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fi

# this variable is needed for the build for signing the
# eservice and pservice enclaves
export PDO_ENCLAVE_CODE_SIGN_PEM=/tmp/enclave_code_sign.pem
export PDO_ENCLAVE_CODE_SIGN_PEM=${PDO_SGX_KEY_ROOT}/enclave_code_sign.pem

# these are only used for configuration and registration
# they are not used at build or run time
Expand Down
3 changes: 1 addition & 2 deletions docker/tools/run_services_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ source ${PDO_HOME}/bin/lib/common.sh

export PDO_HOSTNAME=localhost
export PDO_LEDGER_ADDRESS=$(force_to_ip ${PDO_HOSTNAME})
export PDO_LEDGER_PORT=6600
export PDO_LEDGER_URL="http://${PDO_LEDGER_ADDRESS}:${PDO_LEDGER_PORT}"
export PDO_LEDGER_URL="http://${PDO_LEDGER_ADDRESS}:6600"

check_pdo_runtime_env

Expand Down
2 changes: 0 additions & 2 deletions eservice/bin/register-with-ledger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ function Register {
VAR_BASENAME=$(grep -o 'BASENAME:.*' ${eservice_enclave_info_file} | cut -f2- -d:)

: "${PDO_LEDGER_URL:?Registration failed! PDO_LEDGER_URL environment variable not set}"
: "${PDO_LEDGER_ADDRESS:?Registration failed! PDO_LEDGER_ADDRESS environment variable not set}"
: "${PDO_LEDGER_PORT:?Registration failed! PDO_LEDGER_PORT environment variable not set}"
: "PDO_IAS_KEY_PEM" "${PDO_IAS_KEY_PEM:?Registration failed! PDO_IAS_KEY_PEM environment variable not set}"

if [ ${PDO_LEDGER_TYPE} == "ccf" ]; then
Expand Down

0 comments on commit e27216e

Please sign in to comment.