From 37b901aa96a259956206600b32faf4344582d2cb Mon Sep 17 00:00:00 2001 From: wuzhaomin Date: Thu, 18 Apr 2024 15:43:58 +0800 Subject: [PATCH] add cli-test/firebird/oe_test_create_firebird-superserver.sh --- suite2cases/firebird.json | 3 ++ .../oe_test_create_firebird-superserver.sh | 49 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 testcases/cli-test/firebird/oe_test_create_firebird-superserver.sh diff --git a/suite2cases/firebird.json b/suite2cases/firebird.json index 254dac608..b4547f3b8 100644 --- a/suite2cases/firebird.json +++ b/suite2cases/firebird.json @@ -3,6 +3,9 @@ "cases": [ { "name": "oe_test_service_firebird-superserver" + }, + { + "name": "oe_test_create_firebird-superserver" } ] } diff --git a/testcases/cli-test/firebird/oe_test_create_firebird-superserver.sh b/testcases/cli-test/firebird/oe_test_create_firebird-superserver.sh new file mode 100644 index 000000000..75b69f2a3 --- /dev/null +++ b/testcases/cli-test/firebird/oe_test_create_firebird-superserver.sh @@ -0,0 +1,49 @@ +#!/usr/bin/bash + +# Copyright (c) KylinSoft Co., Ltd. 2023-2024.All rights reserved. +# Copyright (c) 2021. Huawei Technologies Co.,Ltd.ALL rights reserved. +# This program is licensed under Mulan PSL v2. +# You can use it according to the terms and conditions of the Mulan PSL v2. +# http://license.coscl.org.cn/MulanPSL2 +# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# See the Mulan PSL v2 for more detaitest -f. + +# ############################################# +# @Author : wuzhaomin +# @Contact : wuzhaomin@kylinos.cn +# @Date : 2024/4/18 +# @License : Mulan PSL v2 +# @Desc : test hasher +# ############################################ + +source "../common/common_lib.sh" + +function pre_test() { + LOG_INFO "Start environmental preparation." + DNF_INSTALL firebird + LOG_INFO "End of environmental preparation!" +} + +function run_test() { + LOG_INFO "Start to run test." + expect <<-END + isql-fb -user SYSDBA -password masterkey + CREATE DATABASE 'your_database_name'; + CONNECT 'your_database_name'; + EXIT; +END + pwd + CHECK_RESULT $? + LOG_INFO "End to run test." +} + +function post_test() { + LOG_INFO "start environment cleanup." + rm -rf ./your_database_name + DNF_REMOVE + LOG_INFO "Finish environment cleanup!" +} + +main "$@" -- Gitee