Compare commits

..

1 Commits

Author SHA1 Message Date
sdk-team
4f8cf9d05f Support new feature. 2023-09-14 08:30:09 +00:00
9 changed files with 51 additions and 29 deletions

View File

@@ -8,22 +8,14 @@ on:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macosx-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
name: CPP
env:
CPLUS_INCLUDE_PATH: "/usr/local/include/:/usr/include/jsoncpp/:/usr/local/opt/openssl/include/:/usr/lib/"
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
- if: ${{ matrix.os == 'macosx-latest' }}
run: brew install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
- run: sudo apt-get install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
- run: bash ./unit_test.sh
- run: bash ./generate_code_cov.sh
- run: bash ./generate_code_cov.sh
- run: bash ./function_test.sh
- run: bash <(curl -s https://codecov.io/bash)

View File

@@ -1 +1 @@
1.36.1758
1.36.1759

View File

@@ -7,11 +7,11 @@ if command -v python > /dev/null ; then
MAKE="make -j $(python -c 'import multiprocessing as mp; print(int(mp.cpu_count()))')"
fi
echo "$MAKE"
echo $MAKE
rm -rf sdk_build
mkdir sdk_build
cd sdk_build || exit
cd sdk_build
cmake -DBUILD_PRODUCT="$product" -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DENABLE_COVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
$MAKE

View File

@@ -1,6 +1,6 @@
#!/bin/bash
cd $(dirname "$0") || exit
cd `dirname $0`
echo '-------build function test----------'
MAKE=make
@@ -8,12 +8,12 @@ if command -v python > /dev/null ; then
MAKE="make -j $(python -c 'import multiprocessing as mp; print(int(mp.cpu_count()))')"
fi
echo "$MAKE"
echo $MAKE
FT_BUILD_DIR=ft_build
rm -rf $FT_BUILD_DIR
mkdir $FT_BUILD_DIR
cd $FT_BUILD_DIR || exit
cd $FT_BUILD_DIR
cmake -DBUILD_FUNCTION_TESTS=ON -DBUILD_UNIT_TESTS=OFF ..
$MAKE cdn core cs ecs rds slb vpc cdn_ft core_ft cs_ft ecs_ft nlp_ft rds_ft slb_ft vpc_ft

View File

@@ -85,6 +85,7 @@ namespace AlibabaCloud
std::vector<Tag> getTags()const;
std::string getEngine()const;
std::string getStorageType()const;
std::string getArchitecture()const;
std::string getVPCId()const;
std::string getVSwitchId()const;
std::string getDBClusterDescription()const;
@@ -102,6 +103,7 @@ namespace AlibabaCloud
int getDeletionLock()const;
std::string getCategory()const;
std::string getDBClusterId()const;
std::string getHotStandbyCluster()const;
std::string getDeployUnit()const;
std::string getDBClusterNetworkType()const;
bool getIsLatestVersion()const;
@@ -142,6 +144,7 @@ namespace AlibabaCloud
std::vector<Tag> tags_;
std::string engine_;
std::string storageType_;
std::string architecture_;
std::string vPCId_;
std::string vSwitchId_;
std::string dBClusterDescription_;
@@ -159,6 +162,7 @@ namespace AlibabaCloud
int deletionLock_;
std::string category_;
std::string dBClusterId_;
std::string hotStandbyCluster_;
std::string deployUnit_;
std::string dBClusterNetworkType_;
bool isLatestVersion_;

View File

@@ -38,6 +38,8 @@ public:
void setPlannedEndTime(const std::string &plannedEndTime);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::string getDBNodeType() const;
void setDBNodeType(const std::string &dBNodeType);
std::string getDBNodeTargetClass() const;
void setDBNodeTargetClass(const std::string &dBNodeTargetClass);
std::string getResourceOwnerAccount() const;
@@ -60,6 +62,7 @@ private:
std::string clientToken_;
std::string plannedEndTime_;
std::string accessKeyId_;
std::string dBNodeType_;
std::string dBNodeTargetClass_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;

View File

@@ -118,6 +118,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
isLatestVersion_ = value["IsLatestVersion"].asString() == "true";
if(!value["HasCompleteStandbyRes"].isNull())
hasCompleteStandbyRes_ = value["HasCompleteStandbyRes"].asString() == "true";
if(!value["HotStandbyCluster"].isNull())
hotStandbyCluster_ = value["HotStandbyCluster"].asString();
if(!value["DataSyncMode"].isNull())
dataSyncMode_ = value["DataSyncMode"].asString();
if(!value["StandbyHAMode"].isNull())
@@ -198,6 +200,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
featureHTAPSupported_ = value["FeatureHTAPSupported"].asString();
if(!value["ProxyServerlessType"].isNull())
proxyServerlessType_ = value["ProxyServerlessType"].asString();
if(!value["Architecture"].isNull())
architecture_ = value["Architecture"].asString();
if(!value["AiType"].isNull())
aiType_ = value["AiType"].asString();
@@ -278,6 +282,11 @@ std::string DescribeDBClusterAttributeResult::getStorageType()const
return storageType_;
}
std::string DescribeDBClusterAttributeResult::getArchitecture()const
{
return architecture_;
}
std::string DescribeDBClusterAttributeResult::getVPCId()const
{
return vPCId_;
@@ -363,6 +372,11 @@ std::string DescribeDBClusterAttributeResult::getDBClusterId()const
return dBClusterId_;
}
std::string DescribeDBClusterAttributeResult::getHotStandbyCluster()const
{
return hotStandbyCluster_;
}
std::string DescribeDBClusterAttributeResult::getDeployUnit()const
{
return deployUnit_;

View File

@@ -61,6 +61,15 @@ void ModifyDBNodeClassRequest::setAccessKeyId(const std::string &accessKeyId) {
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string ModifyDBNodeClassRequest::getDBNodeType() const {
return dBNodeType_;
}
void ModifyDBNodeClassRequest::setDBNodeType(const std::string &dBNodeType) {
dBNodeType_ = dBNodeType;
setParameter(std::string("DBNodeType"), dBNodeType);
}
std::string ModifyDBNodeClassRequest::getDBNodeTargetClass() const {
return dBNodeTargetClass_;
}

View File

@@ -1,31 +1,31 @@
#!/bin/bash
cd $(dirname "$0") || exit
cd `dirname $0`
echo '-------build unit test----------'
echo 'start a test http server'
NODE=$(which nodejs)
NODE=`which nodejs`
if [ "$NODE" ]
then
echo ''
else
NODE=$(which node)
NODE=`which node`
fi
echo 'node binary path: ' "$NODE"
echo 'node binary path: ' $NODE
server=$(ps -ef | grep http_test_server | grep -v grep)
echo "check server: " "$server"
server=`ps -ef | grep http_test_server | grep -v grep`
echo "check server: " $server
if [ "$server" ]
then
echo "server is on"
else
echo "server is off, start it"
cd test/httpserver || exit
cd test/httpserver
npm i
nohup "$NODE" http_test_server.js &
cd - || exit
nohup $NODE http_test_server.js &
cd -
fi
MAKE=make
@@ -33,12 +33,12 @@ if command -v python > /dev/null ; then
MAKE="make -j $(python -c 'import multiprocessing as mp; print(int(mp.cpu_count()))')"
fi
echo "$MAKE"
echo $MAKE
UT_BUILD_DIR=ut_build
rm -rf $UT_BUILD_DIR
mkdir $UT_BUILD_DIR
cd $UT_BUILD_DIR || exit
cd $UT_BUILD_DIR
cmake -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=ON -DENABLE_COVERAGE=ON ..
$MAKE core_ut