Skip to content

Commit

Permalink
Merge pull request SonicCloudOrg#134 from SonicCloudOrg/v1.3.2-beta
Browse files Browse the repository at this point in the history
V1.3.2 beta合入发布
  • Loading branch information
ZhouYixun authored Mar 19, 2022
2 parents badda97 + 08908ae commit f570bcb
Show file tree
Hide file tree
Showing 26 changed files with 267 additions and 79 deletions.
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
sonic-server-eureka:
image: "sonicorg/sonic-server-eureka:v1.3.1-release"
image: "sonicorg/sonic-server-eureka:v1.3.2-beta"
hostname: sonic-server-eureka
environment:
- EUREKA_HOST=sonic-server-eureka
Expand All @@ -12,7 +12,7 @@ services:
ports:
- "9090:9090"
sonic-server-bus:
image: "sonicorg/sonic-server-bus:v1.3.1-release"
image: "sonicorg/sonic-server-bus:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -24,7 +24,7 @@ services:
depends_on:
- sonic-server-eureka
sonic-server-gateway:
image: "sonicorg/sonic-server-gateway:v1.3.1-release"
image: "sonicorg/sonic-server-gateway:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -38,7 +38,7 @@ services:
ports:
- "8094:8094"
sonic-server-controller:
image: "sonicorg/sonic-server-controller:v1.3.1-release"
image: "sonicorg/sonic-server-controller:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -51,7 +51,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-folder:
image: "sonicorg/sonic-server-folder:v1.3.1-release"
image: "sonicorg/sonic-server-folder:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -68,7 +68,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-task:
image: "sonicorg/sonic-server-task:v1.3.1-release"
image: "sonicorg/sonic-server-task:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -81,7 +81,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-transport:
image: "sonicorg/sonic-server-transport:v1.3.1-release"
image: "sonicorg/sonic-server-transport:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down
14 changes: 7 additions & 7 deletions docker-swarm.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
sonic-server-eureka:
image: "sonicorg/sonic-server-eureka:v1.3.1-release"
image: "sonicorg/sonic-server-eureka:v1.3.2-beta"
hostname: sonic-server-eureka
environment:
- EUREKA_HOST=sonic-server-eureka # You should checkout sonic-server-eureka env to support more.
Expand All @@ -24,7 +24,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-bus:
image: "sonicorg/sonic-server-bus:v1.3.1-release"
image: "sonicorg/sonic-server-bus:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -48,7 +48,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-gateway:
image: "sonicorg/sonic-server-gateway:v1.3.1-release"
image: "sonicorg/sonic-server-gateway:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -74,7 +74,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-controller:
image: "sonicorg/sonic-server-controller:v1.3.1-release"
image: "sonicorg/sonic-server-controller:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -99,7 +99,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-folder:
image: "sonicorg/sonic-server-folder:v1.3.1-release"
image: "sonicorg/sonic-server-folder:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down Expand Up @@ -128,7 +128,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-task:
image: "sonicorg/sonic-server-task:v1.3.1-release"
image: "sonicorg/sonic-server-task:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -153,7 +153,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-transport:
image: "sonicorg/sonic-server-transport:v1.3.1-release"
image: "sonicorg/sonic-server-transport:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-bus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-bus</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-controller</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<!-- 依赖列表 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ public RespModel<List<StepsDTO>> findByCaseIdOrderBySort(@RequestParam(name = "c
return new RespModel<>(RespEnum.SEARCH_OK, stepsService.findByCaseIdOrderBySort(caseId));
}

@WebAspect
@ApiOperation(value = "移出测试用例", notes = "将步骤从测试用例移出")
@ApiImplicitParam(name = "id", value = "步骤id", dataTypeClass = Integer.class)
@GetMapping("/resetCaseId")
public RespModel<String> resetCaseId(@RequestParam(name = "id") int id) {
if (stepsService.resetCaseId(id)) {
return new RespModel<>(2000, "移出测试用例成功!");
} else {
return new RespModel<>(RespEnum.ID_NOT_FOUND);
}
}
// @WebAspect
// @ApiOperation(value = "移出测试用例", notes = "将步骤从测试用例移出")
// @ApiImplicitParam(name = "id", value = "步骤id", dataTypeClass = Integer.class)
// @GetMapping("/resetCaseId")
// public RespModel<String> resetCaseId(@RequestParam(name = "id") int id) {
// if (stepsService.resetCaseId(id)) {
// return new RespModel<>(2000, "移出测试用例成功!");
// } else {
// return new RespModel<>(RespEnum.ID_NOT_FOUND);
// }
// }

@WebAspect
@ApiOperation(value = "删除操作步骤", notes = "将步骤删除,并且从所有公共步骤里移除")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public interface DevicesMapper extends BaseMapper<Devices> {
@Select("select size from devices group by size")
List<String> findSizeList();

@Select("select d.* from test_suites_devices tsd inner join devices d on d.id = tsd.devices_id where tsd.test_suites_id = #{TestSuitesId}")
@Select("select d.* from test_suites_devices tsd " +
"inner join devices d on d.id = tsd.devices_id " +
"where tsd.test_suites_id = #{TestSuitesId} " +
"order by tsd.sort asc")
List<Devices> listByTestSuitesId(@Param("TestSuitesId") int TestSuitesId);

Integer findTemper(@Param("ids") List<String> ids);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
public interface TestCasesMapper extends BaseMapper<TestCases> {

@Select("select tc.* from test_suites_test_cases tstc " +
"inner join test_cases tc on tc.id = tstc.test_cases_id " +
"where tstc.test_suites_id = #{suiteId}")
"inner join test_cases tc on tc.id = tstc.test_cases_id " +
"where tstc.test_suites_id = #{suiteId} " +
"order by tstc.sort asc")
List<TestCases> listByTestSuitesId(@Param("suiteId") int suiteId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.cloud.sonic.controller.models.enums.ConditionEnum;

import java.io.Serializable;

Expand All @@ -39,6 +40,10 @@ public class Steps implements Serializable, TypeConverter<Steps, StepsDTO> {
@IsAutoIncrement
private Integer id;

@TableField
@Column(value = "parent_id", defaultValue = "0", isNull = false, comment = "父级id,一般父级都是条件步骤")
private Integer parentId;

@TableField
@Column(value = "case_id", isNull = false, comment = "所属测试用例id")
@Index(value = "IDX_CASE_ID", columns = {"case_id"})
Expand Down Expand Up @@ -72,4 +77,11 @@ public class Steps implements Serializable, TypeConverter<Steps, StepsDTO> {
@TableField
@Column(type = MySqlTypeConstant.LONGTEXT, isNull = false, comment = "其它信息")
private String text;

/**
* @see ConditionEnum
*/
@TableField
@Column(value = "condition_type", defaultValue = "0", isNull = false, comment = "条件类型")
private Integer conditionType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ public class TestSuitesDevices implements Serializable, TypeConverter<TestSuites
@TableField
@Column(value = "devices_id", isNull = false, comment = "设备id")
private Integer devicesId;

@TableField
@Column(value = "sort", isNull = false, defaultValue = "0", comment = "排序用")
private Integer sort;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ public class TestSuitesTestCases implements Serializable, TypeConverter<TestSuit
@TableField
@Column(value = "test_cases_id", isNull = false, comment = "测试用例id")
private Integer testCasesId;

@TableField
@Column(value = "sort", isNull = false, defaultValue = "0", comment = "排序用")
private Integer sort;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.cloud.sonic.controller.models.base.TypeConverter;
import org.cloud.sonic.controller.models.domain.Steps;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.cloud.sonic.controller.models.enums.ConditionEnum;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.List;

@ApiModel("运行步骤DTO 模型")
@Data
@Getter
@Setter
@Accessors(chain = true)
@Builder
@NoArgsConstructor
Expand All @@ -29,6 +28,9 @@ public class StepsDTO implements Serializable, TypeConverter<StepsDTO, Steps> {
@ApiModelProperty(value = "id", example = "1")
Integer id;

@ApiModelProperty(value = "父级id,一般父级都是条件步骤", example = "0")
Integer parentId;

@Positive
@ApiModelProperty(value = "项目id", required = true, example = "1")
Integer projectId;
Expand Down Expand Up @@ -60,6 +62,12 @@ public class StepsDTO implements Serializable, TypeConverter<StepsDTO, Steps> {
@ApiModelProperty(value = "异常处理类型", required = true, example = "1")
int error;

/**
* @see ConditionEnum
*/
@ApiModelProperty(value = "步骤条件类型,0:非条件 1:if 2:else if 3:else 4:while", example = "0")
private Integer conditionType = 0;

@ApiModelProperty(value = "包含元素列表")
List<ElementsDTO> elements;

Expand All @@ -69,4 +77,7 @@ public class StepsDTO implements Serializable, TypeConverter<StepsDTO, Steps> {

@ApiModelProperty(value = "所属测试用例")
TestCasesDTO testCasesDTO;

@ApiModelProperty(value = "子步骤")
List<StepsDTO> childSteps;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ public class TestSuitesDevicesDTO implements Serializable, TypeConverter<TestSui
private Integer testSuitesId;

private Integer devicesId;

private Integer sort;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
@AllArgsConstructor
public class TestSuitesTestCasesDTO implements Serializable, TypeConverter<TestSuitesTestCasesDTO, TestSuitesTestCases> {


private Integer testSuitesId;

private Integer testCasesId;

private Integer sort;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package org.cloud.sonic.controller.models.enums;

import java.io.Serializable;

/**
* @author JayWenStar
* @date 2022/3/13 1:49 下午
*/
public enum ConditionEnum implements SonicEnum<Integer>, Serializable {

/**
* 非条件
*/
NONE(0, "none"),

/**
* if 条件
*/
IF(1, "if"),

/**
* else if 条件
*/
ELSE_IF(2, "else_if"),

/**
* else 条件
*/
ELSE(3, "else"),

/**
* while 条件
*/
WHILE(4, "while");

private final Integer value;

private final String name;

ConditionEnum(int value, String name) {
this.value = value;
this.name = name;
}

@Override
public Integer getValue() {
return value;
}

public String getName() {
return name;
}
}
Loading

0 comments on commit f570bcb

Please sign in to comment.