From 5be8e0531c4ab4863f0ec5d590418014575b0bfc Mon Sep 17 00:00:00 2001 From: xiangzihao <460888207@qq.com> Date: Wed, 12 Jan 2022 14:29:03 +0800 Subject: [PATCH] [E2E] [Resource] add file manage case (#7906) --- .github/workflows/e2e.yml | 2 + .../e2e/cases/FileManageE2ETest.java | 119 ++++++++++++++++++ .../e2e/cases/UserE2ETest.java | 20 +-- .../dolphinscheduler/e2e/pages/LoginPage.java | 2 +- .../e2e/pages/common/NavBarPage.java | 24 +++- .../e2e/pages/resource/FileManagePage.java | 111 ++++++++++++++++ .../e2e/pages/resource/ResourcePage.java | 53 ++++++++ .../e2e/pages/security/SecurityPage.java | 15 ++- .../e2e/pages/security/UserPage.java | 24 ++-- .../docker/file-manage/common.properties | 94 ++++++++++++++ .../docker/file-manage/docker-compose.yaml | 56 +++++++++ .../e2e/core/DolphinSchedulerExtension.java | 2 +- .../pages/file/pages/createFolder/index.vue | 6 +- .../pages/file/pages/list/_source/list.vue | 4 +- .../resource/pages/file/pages/list/index.vue | 11 +- .../src/js/module/components/nav/nav.vue | 2 +- .../components/secondaryMenu/_source/menu.js | 15 ++- 17 files changed, 521 insertions(+), 39 deletions(-) create mode 100644 dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/FileManageE2ETest.java create mode 100644 dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java create mode 100644 dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/ResourcePage.java create mode 100644 dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/common.properties create mode 100644 dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0cfbe5ab41..9ae7e390b5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -46,6 +46,8 @@ jobs: class: org.apache.dolphinscheduler.e2e.cases.QueueE2ETest - name: Workflow class: org.apache.dolphinscheduler.e2e.cases.WorkflowE2ETest + - name: FileManage + class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest env: RECORDING_PATH: /tmp/recording-${{ matrix.case.name }} steps: diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/FileManageE2ETest.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/FileManageE2ETest.java new file mode 100644 index 0000000000..98bbada252 --- /dev/null +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/FileManageE2ETest.java @@ -0,0 +1,119 @@ +/* + * 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.e2e.cases; + + +import org.apache.dolphinscheduler.e2e.core.DolphinScheduler; +import org.apache.dolphinscheduler.e2e.pages.LoginPage; +import org.apache.dolphinscheduler.e2e.pages.resource.FileManagePage; +import org.apache.dolphinscheduler.e2e.pages.resource.ResourcePage; +import org.apache.dolphinscheduler.e2e.pages.security.SecurityPage; +import org.apache.dolphinscheduler.e2e.pages.security.TenantPage; +import org.apache.dolphinscheduler.e2e.pages.security.UserPage; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Order; +import org.junit.jupiter.api.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.remote.RemoteWebDriver; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.awaitility.Awaitility.await; + +@DolphinScheduler(composeFiles = "docker/file-manage/docker-compose.yaml") +public class FileManageE2ETest { + private static RemoteWebDriver browser; + + private static final String tenant = System.getProperty("user.name"); + + private static final String user = "admin"; + + private static final String password = "dolphinscheduler123"; + + private static final String email = "admin@gmail.com"; + + private static final String phone = "15800000000"; + + private static final String testDiretoryName = "test_directory"; + + @BeforeAll + public static void setup() { + TenantPage tenantPage = new LoginPage(browser) + .login(user, password) + .create(tenant); + + await().untilAsserted(() -> assertThat(tenantPage.tenantList()) + .as("Tenant list should contain newly-created tenant") + .extracting(WebElement::getText) + .anyMatch(it -> it.contains(tenant))); + + tenantPage.goToNav(SecurityPage.class) + .goToTab(UserPage.class) + .update(user, user, password, email, phone) + .goToNav(ResourcePage.class) + .goToTab(FileManagePage.class); + } + + @Test + @Order(10) + void testCreateDirectory() { + final FileManagePage page = new FileManagePage(browser); + + page.createDirectory(testDiretoryName, "test_desc"); + + await().untilAsserted(() -> assertThat(page.fileList()) + .as("File list should contain newly-created file") + .extracting(WebElement::getText) + .anyMatch(it -> it.contains(testDiretoryName))); + } + + @Test + @Order(20) + void testCreateDuplicateDirectory() { + final FileManagePage page = new FileManagePage(browser); + + page.createDirectory(testDiretoryName, "test_desc"); + + await().untilAsserted(() -> assertThat(browser.findElement(By.tagName("body")).getText()) + .contains("resource already exists") + ); + + page.createDirectoryBox().buttonCancel().click(); + } + + @Test + @Order(30) + void testDeleteDirectory() { + final FileManagePage page = new FileManagePage(browser); + + page.delete(testDiretoryName); + + await().untilAsserted(() -> { + browser.navigate().refresh(); + + assertThat( + page.fileList() + ).noneMatch( + it -> it.getText().contains(testDiretoryName) + ); + }); + } +} diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UserE2ETest.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UserE2ETest.java index 4597c6e231..23e56ff4b6 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UserE2ETest.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UserE2ETest.java @@ -55,13 +55,19 @@ class UserE2ETest { @BeforeAll public static void setup() { - new LoginPage(browser) - .login("admin", "dolphinscheduler123") - .goToNav(SecurityPage.class) - .goToTab(TenantPage.class) - .create(tenant) - .goToNav(SecurityPage.class) - .goToTab(UserPage.class); + TenantPage tenantPage = new LoginPage(browser) + .login("admin", "dolphinscheduler123") + .goToNav(SecurityPage.class) + .goToTab(TenantPage.class) + .create(tenant); + + await().untilAsserted(() -> assertThat(tenantPage.tenantList()) + .as("Tenant list should contain newly-created tenant") + .extracting(WebElement::getText) + .anyMatch(it -> it.contains(tenant))); + + tenantPage.goToNav(SecurityPage.class) + .goToTab(UserPage.class); } @AfterAll diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/LoginPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/LoginPage.java index 9fd782d2df..49782e42e3 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/LoginPage.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/LoginPage.java @@ -52,7 +52,7 @@ public final class LoginPage extends NavBarPage { inputPassword().sendKeys(password); buttonLogin().click(); - new WebDriverWait(driver(), 10) + new WebDriverWait(driver, 10) .until(ExpectedConditions.urlContains("/#/security")); return new TenantPage(driver); diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java index e9d54d4ad7..27e196f279 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java @@ -20,12 +20,16 @@ package org.apache.dolphinscheduler.e2e.pages.common; import org.apache.dolphinscheduler.e2e.pages.project.ProjectPage; +import org.apache.dolphinscheduler.e2e.pages.resource.ResourcePage; import org.apache.dolphinscheduler.e2e.pages.security.SecurityPage; +import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; import lombok.Getter; @@ -35,9 +39,13 @@ public class NavBarPage { @FindBy(id = "tabProject") private WebElement projectTab; + @FindBy(id = "tabSecurity") private WebElement securityTab; + @FindBy(id = "tabResource") + private WebElement resourceTab; + public NavBarPage(RemoteWebDriver driver) { this.driver = driver; @@ -46,14 +54,26 @@ public class NavBarPage { public T goToNav(Class nav) { if (nav == ProjectPage.class) { - projectTab().click(); + WebElement projectTabElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(projectTab)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", projectTabElement); return nav.cast(new ProjectPage(driver)); } + if (nav == SecurityPage.class) { - securityTab().click(); + WebElement securityTabElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(securityTab)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", securityTabElement); return nav.cast(new SecurityPage(driver)); } + if (nav == ResourcePage.class) { + WebElement resourceTabElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(resourceTab)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", resourceTabElement); + return nav.cast(new ResourcePage(driver)); + } + throw new UnsupportedOperationException("Unknown nav bar"); } diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java new file mode 100644 index 0000000000..08d931197d --- /dev/null +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java @@ -0,0 +1,111 @@ +/* + * 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.e2e.pages.resource; + +import lombok.Getter; + +import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; +import org.apache.dolphinscheduler.e2e.pages.security.TenantPage; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.remote.RemoteWebDriver; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.FindBys; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + + +@Getter +public class FileManagePage extends NavBarPage implements ResourcePage.Tab { + @FindBy(id = "btnCreateDirectory") + private WebElement buttonCreateDirectory; + + private final CreateDirectoryBox createDirectoryBox; + + @FindBy(className = "items") + private List fileList; + + @FindBy(id = "delete") + private WebElement buttonDelete; + + @FindBys({ + @FindBy(className = "el-popconfirm"), + @FindBy(className = "el-button--primary"), + }) + private List buttonConfirm; + + public FileManagePage(RemoteWebDriver driver) { + super(driver); + + createDirectoryBox = new CreateDirectoryBox(); + } + + public FileManagePage createDirectory(String name, String description) { + buttonCreateDirectory().click(); + + createDirectoryBox().inputDirectoryName().sendKeys(name); + createDirectoryBox().inputDescription().sendKeys(description); + createDirectoryBox().buttonSubmit().click(); + + return this; + } + + public FileManagePage delete(String name) { + fileList() + .stream() + .filter(it -> it.getText().contains(name)) + .flatMap(it -> it.findElements(By.id("delete")).stream()) + .filter(WebElement::isDisplayed) + .findFirst() + .orElseThrow(() -> new RuntimeException("No delete button in file manage list")) + .click(); + + buttonConfirm() + .stream() + .filter(WebElement::isDisplayed) + .findFirst() + .orElseThrow(() -> new RuntimeException("No confirm button when deleting")) + .click(); + + return this; + } + + @Getter + public class CreateDirectoryBox { + CreateDirectoryBox() { + PageFactory.initElements(driver, this); + } + + @FindBy(id = "inputDirectoryName") + private WebElement inputDirectoryName; + + @FindBy(id = "inputDescription") + private WebElement inputDescription; + + @FindBy(id = "btnSubmit") + private WebElement buttonSubmit; + + @FindBy(id = "btnCancel") + private WebElement buttonCancel; + } +} diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/ResourcePage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/ResourcePage.java new file mode 100644 index 0000000000..0e9ee74565 --- /dev/null +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/ResourcePage.java @@ -0,0 +1,53 @@ +/* + * 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.e2e.pages.resource; + +import lombok.Getter; +import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; +import org.apache.dolphinscheduler.e2e.pages.security.TenantPage; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.remote.RemoteWebDriver; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + + +@Getter +public class ResourcePage extends NavBarPage implements NavBarPage.NavBarItem { + @FindBy(className = "tab-file-manage") + private WebElement fileMagageManage; + + public ResourcePage(RemoteWebDriver driver) { + super(driver); + } + + public T goToTab(Class tab) { + if (tab == FileManagePage.class) { + WebElement fileMagageManageElement = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(fileMagageManage)); + fileMagageManageElement.click(); + return tab.cast(new FileManagePage(driver)); + } + throw new UnsupportedOperationException("Unknown tab: " + tab.getName()); + } + + public interface Tab { + } +} diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java index 7a4d219405..05ac617cff 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/SecurityPage.java @@ -22,11 +22,14 @@ package org.apache.dolphinscheduler.e2e.pages.security; import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage.NavBarItem; +import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.support.FindBy; import lombok.Getter; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; @Getter public class SecurityPage extends NavBarPage implements NavBarItem { @@ -48,15 +51,21 @@ public class SecurityPage extends NavBarPage implements NavBarItem { public T goToTab(Class tab) { if (tab == TenantPage.class) { - menuTenantManage().click(); + WebElement menuTenantManageElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(menuTenantManage)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", menuTenantManageElement); return tab.cast(new TenantPage(driver)); } if (tab == UserPage.class) { - menUserManage().click(); + WebElement menUserManageElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(menUserManage)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", menUserManageElement); return tab.cast(new UserPage(driver)); } if (tab == WorkerGroupPage.class) { - menWorkerGroupManage().click(); + WebElement menWorkerGroupManageElement = new WebDriverWait(driver, 60) + .until(ExpectedConditions.elementToBeClickable(menWorkerGroupManage)); + ((JavascriptExecutor)driver).executeScript("arguments[0].click();", menWorkerGroupManageElement); return tab.cast(new WorkerGroupPage(driver)); } if (tab == QueuePage.class) { diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/UserPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/UserPage.java index b602404b80..5fa967449d 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/UserPage.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/UserPage.java @@ -67,8 +67,8 @@ public final class UserPage extends NavBarPage implements SecurityPage.Tab { } public UserPage update(String user, String editUser, String editPassword, String editEmail, String editPhone) { - userList() - .stream() + List userList = driver.findElementsByClassName("items"); + userList.stream() .filter(it -> it.findElement(By.className("name")).getAttribute("innerHTML").contains(user)) .flatMap(it -> it.findElements(By.className("edit")).stream()) .filter(WebElement::isDisplayed) @@ -76,15 +76,17 @@ public final class UserPage extends NavBarPage implements SecurityPage.Tab { .orElseThrow(() -> new RuntimeException("No edit button in user list")) .click(); - editUserForm().inputUserName().clear(); - editUserForm().inputUserName().sendKeys(editUser); - editUserForm().inputUserPassword().clear(); - editUserForm().inputUserPassword().sendKeys(editPassword); - editUserForm().inputEmail().clear(); - editUserForm().inputEmail().sendKeys(editEmail); - editUserForm().inputPhone().clear(); - editUserForm().inputPhone().sendKeys(editPhone); - editUserForm().buttonSubmit().click(); + UserForm editUserForm = new UserForm(); + + editUserForm.inputUserName().clear(); + editUserForm.inputUserName().sendKeys(editUser); + editUserForm.inputUserPassword().clear(); + editUserForm.inputUserPassword().sendKeys(editPassword); + editUserForm.inputEmail().clear(); + editUserForm.inputEmail().sendKeys(editEmail); + editUserForm.inputPhone().clear(); + editUserForm.inputPhone().sendKeys(editPhone); + editUserForm.buttonSubmit().click(); return this; } diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/common.properties b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/common.properties new file mode 100644 index 0000000000..a5613746e5 --- /dev/null +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/common.properties @@ -0,0 +1,94 @@ +# +# 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. +# + +# user data local directory path, please make sure the directory exists and have read write permissions +data.basedir.path=/tmp/dolphinscheduler + +# resource storage type: HDFS, S3, NONE +resource.storage.type=HDFS + +# resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended +resource.upload.path=/dolphinscheduler + +# whether to startup kerberos +hadoop.security.authentication.startup.state=false + +# java.security.krb5.conf path +java.security.krb5.conf.path=/opt/krb5.conf + +# login user from keytab username +login.user.keytab.username=hdfs-mycluster@ESZ.COM + +# login user from keytab path +login.user.keytab.path=/opt/hdfs.headless.keytab + +# kerberos expire time, the unit is hour +kerberos.expire.time=2 + +# resource view suffixs +#resource.view.suffixs=txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js + +# if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path +hdfs.root.user=hdfs + +# if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir +fs.defaultFS=hdfs://hdfs:8020 + +# if resource.storage.type=S3, s3 endpoint +fs.s3a.endpoint=http://192.168.xx.xx:9010 + +# if resource.storage.type=S3, s3 access key +fs.s3a.access.key=A3DXS30FO22544RE + +# if resource.storage.type=S3, s3 secret key +fs.s3a.secret.key=OloCLq3n+8+sdPHUhJ21XrSxTC+JK + +# resourcemanager port, the default value is 8088 if not specified +resource.manager.httpaddress.port=8088 + +# if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty +yarn.resourcemanager.ha.rm.ids=192.168.xx.xx,192.168.xx.xx + +# if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname +yarn.application.status.address=http://ds1:%s/ws/v1/cluster/apps/%s + +# job history status url when application number threshold is reached(default 10000, maybe it was set to 1000) +yarn.job.history.status.address=http://ds1:19888/ws/v1/history/mapreduce/jobs/%s + +# datasource encryption enable +datasource.encryption.enable=false + +# datasource encryption salt +datasource.encryption.salt=!@#$%^&* + +# use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions; if set false, executing user is the deploy user and doesn't need sudo permissions +sudo.enable=true + +# network interface preferred like eth0, default: empty +#dolphin.scheduler.network.interface.preferred= + +# network IP gets priority, default: inner outer +#dolphin.scheduler.network.priority.strategy=default + +# system env path +#dolphinscheduler.env.path=env/dolphinscheduler_env.sh + +# development state +development.state=false + +# rpc port +alert.rpc.port=50052 diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml new file mode 100644 index 0000000000..c9e8db705e --- /dev/null +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml @@ -0,0 +1,56 @@ +# +# 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. +# + +version: "2.1" + +services: + dolphinscheduler: + image: apache/dolphinscheduler-standalone-server:ci + environment: + MASTER_MAX_CPU_LOAD_AVG: 100 + WORKER_TENANT_AUTO_CREATE: 'true' + expose: + - 12345 + networks: + - e2e + healthcheck: + test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] + interval: 5s + timeout: 60s + retries: 120 + volumes: + - ./common.properties:/opt/dolphinscheduler/conf/common.properties + depends_on: + hdfs: + condition: service_healthy + hdfs: + image: mdouchement/hdfs:latest + hostname: hdfs + tty: true + stdin_open: true + expose: + - 8020 + networks: + - e2e + healthcheck: + test: [ "CMD", "curl", "http://localhost:50070" ] + interval: 5s + timeout: 120s + retries: 120 + +networks: + e2e: diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java index d43386f3a4..518f9f62e3 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java @@ -193,7 +193,7 @@ final class DolphinSchedulerExtension .withPull(true) .withTailChildContainers(true) .withLogConsumer("dolphinscheduler_1", outputFrame -> LOGGER.info(outputFrame.getUtf8String())) - .waitingFor("dolphinscheduler_1", Wait.forHealthcheck()); + .waitingFor("dolphinscheduler_1", Wait.forHealthcheck().withStartupTimeout(Duration.ofSeconds(180))); return compose; } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue index deaec7d8d3..8affc61e06 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue @@ -22,6 +22,7 @@ diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue index ab68e5a2c2..5f6806f458 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue @@ -17,7 +17,7 @@