You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/07 02:36:40 UTC

[GitHub] [dolphinscheduler] SnowMoon-Dev commented on a diff in pull request #10817: [API-Test] [Improvement] update api test demo

SnowMoon-Dev commented on code in PR #10817:
URL: https://github.com/apache/dolphinscheduler/pull/10817#discussion_r915397757


##########
.github/workflows/api-test.yml:
##########
@@ -86,8 +86,12 @@ jobs:
     strategy:
       matrix:
         case:
+          - name: Login
+            class: org.apache.dolphinscheduler.api.test.cases.LoginAPITest
           - name: Tenant
             class: org.apache.dolphinscheduler.api.test.cases.TenantAPITest
+          - name: TenantNew
+            class: org.apache.dolphinscheduler.api.test.cases.TenantAPITestNew

Review Comment:
   ok i will fix this



##########
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api.test/base/IPageAPI.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.api.test.base;
+
+import io.restassured.response.Response;
+import io.restassured.specification.RequestSpecification;
+import org.apache.dolphinscheduler.api.test.core.common.FormParam;
+import org.apache.dolphinscheduler.api.test.core.common.RequestMethod;
+import org.apache.dolphinscheduler.api.test.utils.RestResponse;
+import org.apache.dolphinscheduler.api.test.utils.Result;
+
+import java.util.Map;
+
+import static io.restassured.RestAssured.given;
+
+public interface IPageAPI {
+
+    default RestResponse<Result> toResponse(Response response) {
+        return new RestResponse<>(Result.class, response);
+    }
+
+    default Response RestRequestByRequestMap(RequestSpecification request, String sessionId,

Review Comment:
   ok i will fix this



##########
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api.test/pages/security/tenant/entity/TenantBaseEntity.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.dolphinscheduler.api.test.pages.security.tenant.entity;
+
+
+import org.apache.dolphinscheduler.api.test.base.AbstractBaseEntity;
+
+public class TenantBaseEntity extends AbstractBaseEntity {
+
+    private String tenantCode;
+
+    private String description;
+
+    private int queueId = 1;

Review Comment:
   ok i will fix this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org