From 44d72a95532010b4027f0a13615b835bc07c90e3 Mon Sep 17 00:00:00 2001 From: liaochuntao Date: Mon, 26 Sep 2022 22:38:11 +0800 Subject: [PATCH] Update unit test (#699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix issue #629 (#693) * docs:优化错误信息描述 * Update zh.toml * fix:修复eureka心跳协议错误码不兼容问题 * fix:修复eureka心跳协议错误码不兼容问题 * unit:添加单元测试 * test:调整测试配置文件位置 * fix:issue #692 * fix:issue #692 * fix:issue #692 * fix:issue #692 * docs:add error code desc * stash code * fix:增量脚本修复 --- store/sqldb/scripts/delta/v1_11_0-v1_12_0.sql | 12 ++++++------ store/sqldb/scripts/polaris_server.sql | 2 +- .../mesh/invalid-virtualService.yaml | 5 +++-- {service => testdata}/mesh/normal-gateway.yaml | 0 .../mesh/normal-virtualService-nometa.yaml | 0 .../mesh/normal-virtualService.yaml | 0 .../mesh/update-virtualService.yaml | 0 7 files changed, 10 insertions(+), 9 deletions(-) rename {service => testdata}/mesh/invalid-virtualService.yaml (91%) rename {service => testdata}/mesh/normal-gateway.yaml (100%) rename {service => testdata}/mesh/normal-virtualService-nometa.yaml (100%) rename {service => testdata}/mesh/normal-virtualService.yaml (100%) rename {service => testdata}/mesh/update-virtualService.yaml (100%) diff --git a/store/sqldb/scripts/delta/v1_11_0-v1_12_0.sql b/store/sqldb/scripts/delta/v1_11_0-v1_12_0.sql index 814801509..af6bfa3bb 100644 --- a/store/sqldb/scripts/delta/v1_11_0-v1_12_0.sql +++ b/store/sqldb/scripts/delta/v1_11_0-v1_12_0.sql @@ -21,19 +21,19 @@ USE `polaris_server`; CREATE TABLE `routing_config_v2` ( - `id` VARCHAR(128) PRIMARY KEY, - `name` VARCHAR(64) NOT NULL, - `namespace` VARCHAR(64) NOT NULL, + `id` VARCHAR(128) NOT NULL, + `name` VARCHAR(64) NOT NULL default '', + `namespace` VARCHAR(64) NOT NULL default '', `policy` VARCHAR(64) NOT NULL, `config` TEXT, `enable` INT NOT NULL DEFAULT 0, `revision` VARCHAR(40) NOT NULL, `description` VARCHAR(500) NOT NULL DEFAULT '', - `priority` smallint(6) NOT NULL DEFAULT '0' comment 'ratelimit rule priority', + `priority` smallint(6) NOT NULL DEFAULT '0' comment 'routing rule priority', `flag` TINYINT(4) NOT NULL DEFAULT '0', `ctime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `mtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP onupdate CURRENT_TIMESTAMP, - `etime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `mtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `etime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `extend_info` VARCHAR(1024) DEFAULT '', PRIMARY KEY (`id`), KEY `mtime` (`mtime`) diff --git a/store/sqldb/scripts/polaris_server.sql b/store/sqldb/scripts/polaris_server.sql index c6241a28a..aed7704b4 100644 --- a/store/sqldb/scripts/polaris_server.sql +++ b/store/sqldb/scripts/polaris_server.sql @@ -930,7 +930,7 @@ CREATE TABLE `routing_config_v2` `enable` INT NOT NULL DEFAULT 0, `revision` VARCHAR(40) NOT NULL, `description` VARCHAR(500) NOT NULL DEFAULT '', - `priority` smallint(6) NOT NULL DEFAULT '0' comment 'ratelimit rule priority', + `priority` smallint(6) NOT NULL DEFAULT '0' comment 'routing rule priority', `flag` TINYINT(4) NOT NULL DEFAULT '0', `ctime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `mtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, diff --git a/service/mesh/invalid-virtualService.yaml b/testdata/mesh/invalid-virtualService.yaml similarity index 91% rename from service/mesh/invalid-virtualService.yaml rename to testdata/mesh/invalid-virtualService.yaml index 27859a71a..587b621e0 100644 --- a/service/mesh/invalid-virtualService.yaml +++ b/testdata/mesh/invalid-virtualService.yaml @@ -2,8 +2,9 @@ apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route -spec: hosts: -- reviews.prod.svc.cluster.local +spec: + hosts: + - reviews.prod.svc.cluster.local http: - name: "reviews-v2-routes" match: diff --git a/service/mesh/normal-gateway.yaml b/testdata/mesh/normal-gateway.yaml similarity index 100% rename from service/mesh/normal-gateway.yaml rename to testdata/mesh/normal-gateway.yaml diff --git a/service/mesh/normal-virtualService-nometa.yaml b/testdata/mesh/normal-virtualService-nometa.yaml similarity index 100% rename from service/mesh/normal-virtualService-nometa.yaml rename to testdata/mesh/normal-virtualService-nometa.yaml diff --git a/service/mesh/normal-virtualService.yaml b/testdata/mesh/normal-virtualService.yaml similarity index 100% rename from service/mesh/normal-virtualService.yaml rename to testdata/mesh/normal-virtualService.yaml diff --git a/service/mesh/update-virtualService.yaml b/testdata/mesh/update-virtualService.yaml similarity index 100% rename from service/mesh/update-virtualService.yaml rename to testdata/mesh/update-virtualService.yaml