mirror of https://github.com/k3s-io/k3s.git
Add MariaDB to E2E (#10724)
* add mariadb to Validate and Upgrade E2E tests Signed-off-by: robertsilen <robert.silen@iki.fi> Signed-off-by: Robert Silén <robert.silen@iki.fi> Co-authored-by: Derek Nola <derek.nola@suse.com>pull/10920/head
parent
7d66fa7ffa
commit
40eda6a823
|
@ -91,7 +91,16 @@ end
|
|||
|
||||
def getDBType(role, role_num, vm)
|
||||
|
||||
if EXTERNAL_DB == "mysql"
|
||||
if EXTERNAL_DB == "mariadb"
|
||||
if role.include?("server") && role_num == 0
|
||||
dockerInstall(vm)
|
||||
vm.provision "Start mariaDB", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MARIADB_ROOT_PASSWORD=e2e mariadb:11"
|
||||
vm.provision "shell", inline: "echo \"Wait for mariaDB to startup\"; sleep 10"
|
||||
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
|
||||
elsif role.include?("server") && role_num != 0
|
||||
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
|
||||
end
|
||||
elsif EXTERNAL_DB == "mysql"
|
||||
if role.include?("server") && role_num == 0
|
||||
dockerInstall(vm)
|
||||
vm.provision "Start mysql", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MYSQL_ROOT_PASSWORD=e2e mysql:5.7"
|
||||
|
|
|
@ -99,8 +99,18 @@ def provision(vm, role, role_num, node_num)
|
|||
end
|
||||
|
||||
def getDBType(role, role_num, vm)
|
||||
|
||||
if EXTERNAL_DB == "mysql"
|
||||
|
||||
if EXTERNAL_DB == "mariadb"
|
||||
if role.include?("server") && role_num == 0
|
||||
dockerInstall(vm)
|
||||
vm.provision "Start mariaDB", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MARIADB_ROOT_PASSWORD=e2e mariadb:11"
|
||||
vm.provision "shell", inline: "echo \"Wait for mariaDB to startup\"; sleep 10"
|
||||
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
|
||||
elsif role.include?("server") && role_num != 0
|
||||
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
|
||||
end
|
||||
|
||||
elsif EXTERNAL_DB == "mysql"
|
||||
if role.include?("server") && role_num == 0
|
||||
dockerInstall(vm)
|
||||
vm.provision "Start mysql", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MYSQL_ROOT_PASSWORD=e2e mysql:5.7"
|
||||
|
|
Loading…
Reference in New Issue