Skip to content

Commit

Permalink
chore(controller): rename Test** to **Test (#1207)
Browse files Browse the repository at this point in the history
rename Test** to **Test
  • Loading branch information
anda-ren authored Sep 15, 2022
1 parent 48d946e commit 7384cb8
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.junit.jupiter.api.Test;

public class TestGraph {
public class GraphTest {

@Test
public void testEmptyGraph() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.junit.jupiter.api.Test;

@Slf4j
public class TestJobStatusCalculator {
public class JobStatusCalculatorTest {

JobStatusCalculator jobStatusCalculator = new JobStatusCalculator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestStatusRequirement {
public class StatusRequirementTest {

@Test
public void testAny() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

@MybatisTest
@AutoConfigureTestDatabase(replace = Replace.NONE)
public class TestJobMapper extends MySqlContainerHolder {
public class JobMapperTest extends MySqlContainerHolder {

@Autowired
private JobMapper jobMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import ai.starwhale.mlops.api.protocol.datastore.RecordDesc;
import ai.starwhale.mlops.api.protocol.datastore.UpdateTableRequest;
import ai.starwhale.mlops.datastore.ColumnSchemaDesc;
import ai.starwhale.mlops.datastore.ColumnType;
import ai.starwhale.mlops.datastore.TableSchemaDesc;
import ai.starwhale.mlops.domain.swds.index.datastore.IndexWriter;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,7 +31,7 @@
import org.junit.jupiter.api.Test;
import org.springframework.http.ResponseEntity;

public class TestIndexWriter {
public class IndexWriterTest {

@Test
public void testLegacySchema() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestDsFileGetter {
public class DsFileGetterTest {

@Test
public void testFileGetter() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestStorageAccessParser {
public class StorageAccessParserTest {

final String auths = "USER.S3.REGION=region\n"
+ "USER.S3.ENDPOINT=endpoint\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestStorageAuths {
public class StorageAuthsTest {

@Test
public void testS3() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestStorageUri {
public class StorageUriTest {


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.junit.jupiter.api.Test;

@Slf4j
public class TestStepHelper {
public class StepHelperTest {

StepHelper stepHelper = new StepHelper();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Expand All @@ -40,13 +39,12 @@
import ai.starwhale.mlops.storage.StorageAccessService;
import com.github.pagehelper.PageInfo;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TestTaskService {
public class TaskServiceTest {

TaskService taskService;
TaskConvertor taskConvertor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* test for {@link TaskWatcherForJobStatus}
*/
public class TestTaskWatcherForJobStatus {
public class TaskWatcherForJobStatusTest {

@Test
public void testJobRunning() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TestTaskLogK8sCollector {
public class TaskLogK8sCollectorTest {

StorageAccessService storageService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import java.util.Comparator;
import java.util.List;
import java.util.UUID;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mybatis.spring.boot.test.autoconfigure.MybatisTest;
Expand All @@ -38,7 +36,7 @@

@MybatisTest
@AutoConfigureTestDatabase(replace = Replace.NONE)
public class TestTaskMapper extends MySqlContainerHolder {
public class TaskMapperTest extends MySqlContainerHolder {

@Autowired
private TaskMapper taskMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package ai.starwhale.mlops.domain.user.mapper;

import ai.starwhale.mlops.domain.MySqlContainerHolder;
import ai.starwhale.mlops.domain.task.po.TaskEntity;
import ai.starwhale.mlops.domain.user.po.UserEntity;
import java.util.Collections;
import java.util.Comparator;
Expand All @@ -32,7 +31,7 @@

@MybatisTest
@AutoConfigureTestDatabase(replace = Replace.NONE)
public class TestUserMapper extends MySqlContainerHolder {
public class UserMapperTest extends MySqlContainerHolder {

@Autowired
private UserMapper userMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;

public class TestLoginRequest {
public class LoginRequestTest {

public void login() {
for (int i = 0; i < 5; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.junit.jupiter.api.Test;
import org.springframework.security.crypto.password.PasswordEncoder;

public class TestPasswordEncoder {
public class PasswordEncoderTest {

@Test
public void testEncoder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TestJobEventHandler {
public class JobEventHandlerTest {

TaskStatusReceiver taskStatusReceiver;
JobEventHandler jobEventHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestK8sJobTemplate {
public class K8sJobTemplateTest {

K8sJobTemplate k8sJobTemplate = new K8sJobTemplate("");

public TestK8sJobTemplate() throws IOException {
public K8sJobTemplateTest() throws IOException {
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestK8sResourcePoolConverter {
public class K8sResourcePoolConverterTest {

@Test
public void testNormalCase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class TestK8sTaskScheduler {
public class K8sTaskSchedulerTest {
public static final String bucket = "bucket";
public static final String accessKey = "accessKey";
public static final String secretKey = "secretKey";
Expand Down Expand Up @@ -156,11 +156,11 @@ public V1Job renderJob(String jobName,

Map<String, String> initEnv = Map.of("DOWNLOADS",
"s3://bucket/path_swmp;/opt/starwhale/swmp/ s3://bucket/path_rt;/opt/starwhale/swrt/",
"SW_S3_BUCKET", TestK8sTaskScheduler.bucket,
"SW_S3_ENDPOINT", TestK8sTaskScheduler.endpoint,
"SW_S3_SECRET", TestK8sTaskScheduler.secretKey,
"SW_S3_ACCESS_KEY", TestK8sTaskScheduler.accessKey,
"SW_S3_REGION", TestK8sTaskScheduler.region,
"SW_S3_BUCKET", K8sTaskSchedulerTest.bucket,
"SW_S3_ENDPOINT", K8sTaskSchedulerTest.endpoint,
"SW_S3_SECRET", K8sTaskSchedulerTest.secretKey,
"SW_S3_ACCESS_KEY", K8sTaskSchedulerTest.accessKey,
"SW_S3_REGION", K8sTaskSchedulerTest.region,
FileStorageEnv.ENV_TYPE, "S3");
Map<String, String> initActual = dp.getEnvs().stream().filter(env -> env.getValue() != null)
.collect(Collectors.toMap(V1EnvVar::getName, V1EnvVar::getValue));
Expand Down

0 comments on commit 7384cb8

Please sign in to comment.