diff --git a/cmd/service.go b/cmd/service.go index bfb7b3b..6a12288 100644 --- a/cmd/service.go +++ b/cmd/service.go @@ -32,6 +32,7 @@ You could choose the alternative images: Docker Hub: docker.io/linuxsuren/api-testing GitHub Container Registry: ghcr.io/linuxsuren/api-testing Scarf: linuxsuren.docker.scarf.sh/linuxsuren/api-testing +AliYun: registry.aliyuncs.com/linuxsuren/api-testing DaoCloud: docker.m.daocloud.io/linuxsuren/api-testing`, PreRunE: opt.preRunE, RunE: opt.runE, diff --git a/console/atest-ui/src/views/TestSuite.vue b/console/atest-ui/src/views/TestSuite.vue index 2d920f9..ac74e32 100644 --- a/console/atest-ui/src/views/TestSuite.vue +++ b/console/atest-ui/src/views/TestSuite.vue @@ -53,10 +53,15 @@ watch(props, () => { }) function save() { - const oldImportPath = suite.value.spec.rpc.import - if (typeof oldImportPath === 'string' && oldImportPath !== '') { - const importPath = oldImportPath.split(',') - suite.value.spec.rpc.import = importPath + let oldImportPath = "" + let hasImport = false + if (suite.value.spec && suite.value.spec.rpc) { + oldImportPath = suite.value.spec.rpc.import + hasImport = true + if (typeof oldImportPath === 'string' && oldImportPath !== '') { + const importPath = oldImportPath.split(',') + suite.value.spec.rpc.import = importPath + } } API.UpdateTestSuite(suite.value, (e) => { @@ -69,9 +74,13 @@ function save() { ElMessage.error('Oops, ' + e.message) } - suite.value.spec.rpc.import = oldImportPath + if (hasImport) { + suite.value.spec.rpc.import = oldImportPath + } }, (e) => { - suite.value.spec.rpc.import = oldImportPath + if (hasImport) { + suite.value.spec.rpc.import = oldImportPath + } ElMessage.error('Oops, ' + e) }) } diff --git a/console/atest-ui/src/views/net.ts b/console/atest-ui/src/views/net.ts index c7a7ffc..9a93f9d 100644 --- a/console/atest-ui/src/views/net.ts +++ b/console/atest-ui/src/views/net.ts @@ -76,7 +76,7 @@ interface ImportSource { } function UpdateTestSuite(suite: any, - callback: (d: any) => {}, errHandle?: (e: any) => {} | null) { + callback: (d: any) => void, errHandle?: (e: any) => void | null) { const requestOptions = { method: 'POST', headers: { diff --git a/pkg/testing/remote/grpc_store.go b/pkg/testing/remote/grpc_store.go index 13b8869..67cc93b 100644 --- a/pkg/testing/remote/grpc_store.go +++ b/pkg/testing/remote/grpc_store.go @@ -190,7 +190,7 @@ func (g *gRPCLoader) DeleteSuite(name string) (err error) { func (g *gRPCLoader) Verify() (readOnly bool, err error) { // avoid to long to wait the response - ctx, cancel := context.WithTimeout(g.ctx, time.Second*3) + ctx, cancel := context.WithTimeout(g.ctx, time.Second*5) defer cancel() var result *server.ExtensionStatus