From 5eed64f4ba1584e76158d4c1150977fb248f3133 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 25 Aug 2023 13:45:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=94=B9nameSpaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/sdk/dto/TestResourceDTO.java | 2 +- .../io/metersphere/sdk/dto/TestResourceReturnDTO.java | 2 +- .../sdk/src/main/resources/i18n/commons_en_US.properties | 2 +- .../controller/TestResourcePoolControllerTests.java | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceDTO.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceDTO.java index c2e85fdb4f..7f34341928 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceDTO.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceDTO.java @@ -45,7 +45,7 @@ public class TestResourceDTO { * type为 k8s 时,接口测试,性能测试的命名空间 */ @Schema(description = "type为k8s时,接口测试,性能测试的命名空间") - private String nameSpaces; + private String namespace; /** * type为 k8s 时,接口测试,性能测试,UI测试的最大并发数 */ diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceReturnDTO.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceReturnDTO.java index ba6274d7ce..b849bfc151 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceReturnDTO.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/TestResourceReturnDTO.java @@ -44,7 +44,7 @@ public class TestResourceReturnDTO { * type为 k8s 时,接口测试,性能测试的命名空间 */ @Schema(description = "type为k8s时,接口测试,性能测试的命名空间") - private String nameSpaces; + private String namespace; /** * type为 k8s 时,接口测试,性能测试,UI测试的最大并发数 */ diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties index b8200d868d..ec28763614 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties @@ -86,7 +86,7 @@ port_is_null = Port cannot be null concurrent_number_is_null = ConcurrentNumber cannot be null monitor_is_null = Monitor cannot be null token_is_null = Token can not be null -namespace_is_null=Namespaces can not be null +namespace_is_null=Namespace can not be null deploy_name_is_null=Deploy Name cannot be null api_test_image_is_null=API cannot be null #project diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java index 570f143c80..98dd6e061c 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java @@ -74,7 +74,7 @@ class TestResourcePoolControllerTests extends BaseTest { " }],\n" + "\"ip\":\"172.2.130.1\",\n" + "\"token\":\"dsdfssdsvgsd\",\n" + - "\"nameSpaces\":\"测试\",\n" + + "\"namespace\":\"测试\",\n" + "\"concurrentNumber\":3,\n" + "\"podThreads\":2,\n" + "\"jobDefinition\":\"jsfsjs\",\n" + @@ -97,7 +97,7 @@ class TestResourcePoolControllerTests extends BaseTest { " \"orgIds\": [\"sys_default_organization_2\",\"sys_default_organization_3\"],\n" + " \"ip\": \"172.2.130.1\",\n" + " \"token\": \"dsdfssdsvgsd\",\n" + - " \"nameSpaces\": \"测试\",\n" + + " \"namespace\": \"测试\",\n" + " \"concurrentNumber\": 3,\n" + " \"podThreads\": 2,\n" + " \"jobDefinition\": \"jsfsjs\",\n" + @@ -311,7 +311,7 @@ class TestResourcePoolControllerTests extends BaseTest { if (testResourcePoolRequest1.getApiTest()) { Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getIp()); Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getToken()); - Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getNameSpaces()); + Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getNamespace()); Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getDeployName()); Assertions.assertTrue(testResourcePoolReturnDTO.getTestResourceReturnDTO().getConcurrentNumber() > 0); Assertions.assertTrue(testResourcePoolReturnDTO.getTestResourceReturnDTO().getPodThreads() > 0); @@ -320,7 +320,7 @@ class TestResourcePoolControllerTests extends BaseTest { if (testResourcePoolRequest1.getLoadTest()) { Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getIp()); Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getToken()); - Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getNameSpaces()); + Assertions.assertNotNull(testResourcePoolReturnDTO.getTestResourceReturnDTO().getNamespace()); Assertions.assertTrue(testResourcePoolReturnDTO.getTestResourceReturnDTO().getConcurrentNumber() > 0); Assertions.assertTrue(testResourcePoolReturnDTO.getTestResourceReturnDTO().getPodThreads() > 0); }