xiangzihao
3 years ago
committed by
GitHub
17 changed files with 887 additions and 9 deletions
@ -0,0 +1,108 @@
|
||||
/* |
||||
* 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 static org.assertj.core.api.Assertions.assertThat; |
||||
import static org.awaitility.Awaitility.await; |
||||
|
||||
import org.apache.dolphinscheduler.e2e.core.DolphinScheduler; |
||||
import org.apache.dolphinscheduler.e2e.pages.LoginPage; |
||||
import org.apache.dolphinscheduler.e2e.pages.datasource.DataSourcePage; |
||||
|
||||
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 org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
|
||||
|
||||
@DolphinScheduler(composeFiles = "docker/datasource-clickhouse/docker-compose.yaml") |
||||
public class ClickhouseDataSourceE2ETest { |
||||
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 dataSourceType = "CLICKHOUSE"; |
||||
|
||||
private static final String dataSourceName = "clickhouse_test"; |
||||
|
||||
private static final String dataSourceDescription = "clickhouse_test"; |
||||
|
||||
private static final String ip = "clickhouse"; |
||||
|
||||
private static final String port = "8123"; |
||||
|
||||
private static final String userName = "ch_test"; |
||||
|
||||
private static final String pgPassword = "ch_test"; |
||||
|
||||
private static final String database = "ch_test"; |
||||
|
||||
private static final String jdbcParams = ""; |
||||
|
||||
|
||||
@BeforeAll |
||||
public static void setup() { |
||||
new LoginPage(browser) |
||||
.login(user, password) |
||||
.goToNav(DataSourcePage.class); |
||||
} |
||||
|
||||
@Test |
||||
@Order(10) |
||||
void testCreateClickhouseDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.createDataSource(dataSourceType, dataSourceName, dataSourceDescription, ip, port, userName, pgPassword, database, jdbcParams); |
||||
|
||||
new WebDriverWait(page.driver(), 10).until(ExpectedConditions.invisibilityOfElementLocated(new By.ById("dialogCreateDataSource"))); |
||||
|
||||
await().untilAsserted(() -> assertThat(page.dataSourceItemsList()) |
||||
.as("DataSource list should contain newly-created database") |
||||
.extracting(WebElement::getText) |
||||
.anyMatch(it -> it.contains(dataSourceName))); |
||||
} |
||||
|
||||
@Test |
||||
@Order(20) |
||||
void testDeleteClickhouseDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.delete(dataSourceName); |
||||
|
||||
await().untilAsserted(() -> { |
||||
browser.navigate().refresh(); |
||||
|
||||
assertThat( |
||||
page.dataSourceItemsList() |
||||
).noneMatch( |
||||
it -> it.getText().contains(dataSourceName) |
||||
); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,108 @@
|
||||
/* |
||||
* 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 static org.assertj.core.api.Assertions.assertThat; |
||||
import static org.awaitility.Awaitility.await; |
||||
|
||||
import org.apache.dolphinscheduler.e2e.core.DolphinScheduler; |
||||
import org.apache.dolphinscheduler.e2e.pages.LoginPage; |
||||
import org.apache.dolphinscheduler.e2e.pages.datasource.DataSourcePage; |
||||
|
||||
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 org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
|
||||
|
||||
@DolphinScheduler(composeFiles = "docker/datasource-mysql/docker-compose.yaml") |
||||
public class MysqlDataSourceE2ETest { |
||||
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 dataSourceType = "MYSQL"; |
||||
|
||||
private static final String dataSourceName = "mysql_test"; |
||||
|
||||
private static final String dataSourceDescription = "mysql_test"; |
||||
|
||||
private static final String ip = "mysql"; |
||||
|
||||
private static final String port = "3306"; |
||||
|
||||
private static final String userName = "root"; |
||||
|
||||
private static final String mysqlPassword = "123456"; |
||||
|
||||
private static final String database = "mysql"; |
||||
|
||||
private static final String jdbcParams = "{\"useSSL\": false}"; |
||||
|
||||
|
||||
@BeforeAll |
||||
public static void setup() { |
||||
new LoginPage(browser) |
||||
.login(user, password) |
||||
.goToNav(DataSourcePage.class); |
||||
} |
||||
|
||||
@Test |
||||
@Order(10) |
||||
void testCreateMysqlDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.createDataSource(dataSourceType, dataSourceName, dataSourceDescription, ip, port, userName, mysqlPassword, database, jdbcParams); |
||||
|
||||
new WebDriverWait(page.driver(), 10).until(ExpectedConditions.invisibilityOfElementLocated(new By.ById("dialogCreateDataSource"))); |
||||
|
||||
await().untilAsserted(() -> assertThat(page.dataSourceItemsList()) |
||||
.as("DataSource list should contain newly-created database") |
||||
.extracting(WebElement::getText) |
||||
.anyMatch(it -> it.contains(dataSourceName))); |
||||
} |
||||
|
||||
@Test |
||||
@Order(20) |
||||
void testDeleteMysqlDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.delete(dataSourceName); |
||||
|
||||
await().untilAsserted(() -> { |
||||
browser.navigate().refresh(); |
||||
|
||||
assertThat( |
||||
page.dataSourceItemsList() |
||||
).noneMatch( |
||||
it -> it.getText().contains(dataSourceName) |
||||
); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,108 @@
|
||||
/* |
||||
* 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 static org.assertj.core.api.Assertions.assertThat; |
||||
import static org.awaitility.Awaitility.await; |
||||
|
||||
import org.apache.dolphinscheduler.e2e.core.DolphinScheduler; |
||||
import org.apache.dolphinscheduler.e2e.pages.LoginPage; |
||||
import org.apache.dolphinscheduler.e2e.pages.datasource.DataSourcePage; |
||||
|
||||
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 org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
|
||||
|
||||
@DolphinScheduler(composeFiles = "docker/datasource-postgresql/docker-compose.yaml") |
||||
public class PostgresDataSourceE2ETest { |
||||
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 dataSourceType = "POSTGRESQL"; |
||||
|
||||
private static final String dataSourceName = "postgres_test"; |
||||
|
||||
private static final String dataSourceDescription = "postgres_test"; |
||||
|
||||
private static final String ip = "postgres"; |
||||
|
||||
private static final String port = "5432"; |
||||
|
||||
private static final String userName = "postgres"; |
||||
|
||||
private static final String pgPassword = "postgres"; |
||||
|
||||
private static final String database = "postgres"; |
||||
|
||||
private static final String jdbcParams = ""; |
||||
|
||||
|
||||
@BeforeAll |
||||
public static void setup() { |
||||
new LoginPage(browser) |
||||
.login(user, password) |
||||
.goToNav(DataSourcePage.class); |
||||
} |
||||
|
||||
@Test |
||||
@Order(10) |
||||
void testCreatePostgresDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.createDataSource(dataSourceType, dataSourceName, dataSourceDescription, ip, port, userName, pgPassword, database, jdbcParams); |
||||
|
||||
new WebDriverWait(page.driver(), 10).until(ExpectedConditions.invisibilityOfElementLocated(new By.ById("dialogCreateDataSource"))); |
||||
|
||||
await().untilAsserted(() -> assertThat(page.dataSourceItemsList()) |
||||
.as("DataSource list should contain newly-created database") |
||||
.extracting(WebElement::getText) |
||||
.anyMatch(it -> it.contains(dataSourceName))); |
||||
} |
||||
|
||||
@Test |
||||
@Order(20) |
||||
void testDeletePostgresDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.delete(dataSourceName); |
||||
|
||||
await().untilAsserted(() -> { |
||||
browser.navigate().refresh(); |
||||
|
||||
assertThat( |
||||
page.dataSourceItemsList() |
||||
).noneMatch( |
||||
it -> it.getText().contains(dataSourceName) |
||||
); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,108 @@
|
||||
/* |
||||
* 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 static org.assertj.core.api.Assertions.assertThat; |
||||
import static org.awaitility.Awaitility.await; |
||||
|
||||
import org.apache.dolphinscheduler.e2e.core.DolphinScheduler; |
||||
import org.apache.dolphinscheduler.e2e.pages.LoginPage; |
||||
import org.apache.dolphinscheduler.e2e.pages.datasource.DataSourcePage; |
||||
|
||||
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 org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
|
||||
|
||||
@DolphinScheduler(composeFiles = "docker/datasource-sqlserver/docker-compose.yaml") |
||||
public class SqlServerDataSourceE2ETest { |
||||
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 dataSourceType = "SQLSERVER"; |
||||
|
||||
private static final String dataSourceName = "sqlserver_test"; |
||||
|
||||
private static final String dataSourceDescription = "sqlserver_test"; |
||||
|
||||
private static final String ip = "sqlserver"; |
||||
|
||||
private static final String port = "1433"; |
||||
|
||||
private static final String userName = "sa"; |
||||
|
||||
private static final String pgPassword = "OcP2020123"; |
||||
|
||||
private static final String database = "master"; |
||||
|
||||
private static final String jdbcParams = ""; |
||||
|
||||
|
||||
@BeforeAll |
||||
public static void setup() { |
||||
new LoginPage(browser) |
||||
.login(user, password) |
||||
.goToNav(DataSourcePage.class); |
||||
} |
||||
|
||||
@Test |
||||
@Order(10) |
||||
void testCreateSqlServerDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.createDataSource(dataSourceType, dataSourceName, dataSourceDescription, ip, port, userName, pgPassword, database, jdbcParams); |
||||
|
||||
new WebDriverWait(page.driver(), 10).until(ExpectedConditions.invisibilityOfElementLocated(new By.ById("dialogCreateDataSource"))); |
||||
|
||||
await().untilAsserted(() -> assertThat(page.dataSourceItemsList()) |
||||
.as("DataSource list should contain newly-created database") |
||||
.extracting(WebElement::getText) |
||||
.anyMatch(it -> it.contains(dataSourceName))); |
||||
} |
||||
|
||||
@Test |
||||
@Order(20) |
||||
void testDeleteSqlServerDataSource() { |
||||
final DataSourcePage page = new DataSourcePage(browser); |
||||
|
||||
page.delete(dataSourceName); |
||||
|
||||
await().untilAsserted(() -> { |
||||
browser.navigate().refresh(); |
||||
|
||||
assertThat( |
||||
page.dataSourceItemsList() |
||||
).noneMatch( |
||||
it -> it.getText().contains(dataSourceName) |
||||
); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,161 @@
|
||||
/* |
||||
* 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.datasource; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; |
||||
|
||||
import java.util.List; |
||||
|
||||
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 org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.Select; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
|
||||
|
||||
@Getter |
||||
public class DataSourcePage extends NavBarPage implements NavBarPage.NavBarItem { |
||||
|
||||
@FindBy(id = "btnCreateDataSource") |
||||
private WebElement buttonCreateDataSource; |
||||
|
||||
@FindBy(className = "data-source-items") |
||||
private List<WebElement> dataSourceItemsList; |
||||
|
||||
@FindBys({ |
||||
@FindBy(className = "el-popconfirm"), |
||||
@FindBy(className = "el-button--primary"), |
||||
}) |
||||
private List<WebElement> buttonConfirm; |
||||
|
||||
private final CreateDataSourceForm createDataSourceForm; |
||||
|
||||
public DataSourcePage(RemoteWebDriver driver) { |
||||
super(driver); |
||||
|
||||
createDataSourceForm = new CreateDataSourceForm(); |
||||
} |
||||
|
||||
public DataSourcePage createDataSource(String dataSourceType, String dataSourceName, String dataSourceDescription, String ip, String port, String userName, String password, String database, |
||||
String jdbcParams) { |
||||
buttonCreateDataSource().click(); |
||||
|
||||
createDataSourceForm().btnDataSourceTypeDropdown().click(); |
||||
|
||||
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(new By.ById("dialogCreateDataSource"))); |
||||
|
||||
createDataSourceForm().selectDataSourceType() |
||||
.stream() |
||||
.filter(it -> it.getText().contains(dataSourceType.toUpperCase())) |
||||
.findFirst() |
||||
.orElseThrow(() -> new RuntimeException(String.format("No %s in data source type list", dataSourceType.toUpperCase()))) |
||||
.click(); |
||||
|
||||
createDataSourceForm().inputDataSourceName().sendKeys(dataSourceName); |
||||
createDataSourceForm().inputDataSourceDescription().sendKeys(dataSourceDescription); |
||||
createDataSourceForm().inputIP().sendKeys(ip); |
||||
createDataSourceForm().inputPort().clear(); |
||||
createDataSourceForm().inputPort().sendKeys(port); |
||||
createDataSourceForm().inputUserName().sendKeys(userName); |
||||
createDataSourceForm().inputPassword().sendKeys(password); |
||||
createDataSourceForm().inputDataBase().sendKeys(database); |
||||
|
||||
if (!"".equals(jdbcParams)) { |
||||
createDataSourceForm().inputJdbcParams().sendKeys(jdbcParams); |
||||
} |
||||
|
||||
createDataSourceForm().buttonSubmit().click(); |
||||
|
||||
return this; |
||||
} |
||||
|
||||
public DataSourcePage delete(String name) { |
||||
dataSourceItemsList() |
||||
.stream() |
||||
.filter(it -> it.getText().contains(name)) |
||||
.flatMap(it -> it.findElements(By.id("btnDelete")).stream()) |
||||
.filter(WebElement::isDisplayed) |
||||
.findFirst() |
||||
.orElseThrow(() -> new RuntimeException("No delete button in data source list")) |
||||
.click(); |
||||
|
||||
buttonConfirm() |
||||
.stream() |
||||
.filter(WebElement::isDisplayed) |
||||
.findFirst() |
||||
.orElseThrow(() -> new RuntimeException("No confirm button when deleting")) |
||||
.click(); |
||||
|
||||
return this; |
||||
} |
||||
|
||||
@Getter |
||||
public class CreateDataSourceForm { |
||||
CreateDataSourceForm() { |
||||
PageFactory.initElements(driver, this); |
||||
} |
||||
|
||||
@FindBy(className = "options-datasource-type") |
||||
private List<WebElement> selectDataSourceType; |
||||
|
||||
@FindBy(id = "btnDataSourceTypeDropDown") |
||||
private WebElement btnDataSourceTypeDropdown; |
||||
|
||||
@FindBy(id = "inputDataSourceName") |
||||
private WebElement inputDataSourceName; |
||||
|
||||
@FindBy(id = "inputDataSourceDescription") |
||||
private WebElement inputDataSourceDescription; |
||||
|
||||
@FindBy(id = "inputIP") |
||||
private WebElement inputIP; |
||||
|
||||
@FindBy(id = "inputPort") |
||||
private WebElement inputPort; |
||||
|
||||
@FindBy(id = "inputUserName") |
||||
private WebElement inputUserName; |
||||
|
||||
@FindBy(id = "inputPassword") |
||||
private WebElement inputPassword; |
||||
|
||||
@FindBy(id = "inputDataBase") |
||||
private WebElement inputDataBase; |
||||
|
||||
@FindBy(id = "inputJdbcParams") |
||||
private WebElement inputJdbcParams; |
||||
|
||||
@FindBy(id = "btnSubmit") |
||||
private WebElement buttonSubmit; |
||||
|
||||
@FindBy(id = "btnCancel") |
||||
private WebElement buttonCancel; |
||||
|
||||
@FindBy(id = "btnTestConnection") |
||||
private WebElement btnTestConnection; |
||||
} |
||||
} |
@ -0,0 +1,61 @@
|
||||
# |
||||
# 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 |
||||
depends_on: |
||||
clickhouse: |
||||
condition: service_healthy |
||||
clickhouse: |
||||
image: yandex/clickhouse-server:21.12.3.32 |
||||
environment: |
||||
- CLICKHOUSE_DB=ch_test |
||||
- CLICKHOUSE_USER=ch_test |
||||
- CLICKHOUSE_PASSWORD=ch_test |
||||
ulimits: |
||||
nofile: |
||||
soft: 262144 |
||||
hard: 262144 |
||||
expose: |
||||
- 8123 |
||||
mem_limit: 3G |
||||
mem_reservation: 1G |
||||
networks: |
||||
- e2e |
||||
healthcheck: |
||||
test: ["CMD", "wget", "--spider", "-q", "localhost:8123/ping"] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
|
||||
networks: |
||||
e2e: |
@ -0,0 +1,58 @@
|
||||
# |
||||
# 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 |
||||
volumes: |
||||
- ./download-mysql.sh:/tmp/download-mysql.sh |
||||
entrypoint: ['bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null'] |
||||
healthcheck: |
||||
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
depends_on: |
||||
mysql: |
||||
condition: service_healthy |
||||
mysql: |
||||
image: mysql:5.7.36 |
||||
command: --default-authentication-plugin=mysql_native_password |
||||
restart: always |
||||
environment: |
||||
MYSQL_ROOT_PASSWORD: 123456 |
||||
networks: |
||||
- e2e |
||||
expose: |
||||
- 3306 |
||||
healthcheck: |
||||
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
|
||||
networks: |
||||
e2e: |
@ -0,0 +1,27 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
set -ex |
||||
|
||||
DS_HOME=/opt/dolphinscheduler/libs |
||||
MYSQL_URL="https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar" |
||||
MYSQL_DRIVER="mysql-connector-java-8.0.16.jar" |
||||
|
||||
if ! curl -Lo "${DS_HOME}/${MYSQL_DRIVER}" ${MYSQL_URL}; then |
||||
echo "Fail to download ${MYSQL_DRIVER}." |
||||
exit 1 |
||||
fi |
@ -0,0 +1,54 @@
|
||||
# |
||||
# 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 |
||||
depends_on: |
||||
postgres: |
||||
condition: service_healthy |
||||
postgres: |
||||
image: postgres:14.1 |
||||
restart: always |
||||
environment: |
||||
POSTGRES_PASSWORD: postgres |
||||
networks: |
||||
- e2e |
||||
expose: |
||||
- 5432 |
||||
healthcheck: |
||||
test: ["CMD-SHELL", "pg_isready -U postgres"] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
|
||||
networks: |
||||
e2e: |
@ -0,0 +1,51 @@
|
||||
# |
||||
# 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 |
||||
depends_on: |
||||
sqlserver: |
||||
condition: service_healthy |
||||
sqlserver: |
||||
image: alexk002/sqlserver2019_demo:1 |
||||
expose: |
||||
- 1433 |
||||
networks: |
||||
- e2e |
||||
healthcheck: |
||||
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P OcP2020123 -Q "SELECT 1" |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
|
||||
networks: |
||||
e2e: |
Loading…
Reference in new issue