Commit 86b25547 authored by Nikos Pitsillos's avatar Nikos Pitsillos Committed by Manuel Buil

test: copy vpn-auth-file to guest

parent b8f101fd
...@@ -47,13 +47,15 @@ def provision(vm, roles, role_num, node_num) ...@@ -47,13 +47,15 @@ def provision(vm, roles, role_num, node_num)
if roles.include?("agent") if roles.include?("agent")
vpn_auth = nil vpn_auth = nil
vpn_auth_method = nil vpn_auth_method = nil
auth_info = "name=tailscale,joinKey=#{TAILSCALE_KEY}"
if role_num == 0 if role_num == 0
vpn_auth_method = "vpn-auth" vpn_auth_method = "vpn-auth"
vpn_auth = "name=tailscale,joinKey=#{TAILSCALE_KEY}" vpn_auth = auth_info
else else
vpn_auth_method = "vpn-auth-file" vpn_auth_method = "vpn-auth-file"
File.write("./vpn-auth-file", vpn_auth) File.write("./vpn-auth-file", auth_info)
vpn_auth = File.expand_path("./vpn-auth-file") vm.provision "file", source: "./vpn-auth-file", destination: "$HOME/vpn-auth-file"
vpn_auth = File.expand_path("$HOME/vpn-auth-file")
end end
vm.provision :k3s, run: 'once' do |k3s| vm.provision :k3s, run: 'once' do |k3s|
k3s.config_mode = '0644' # side-step https://github.com/k3s-io/k3s/issues/4321 k3s.config_mode = '0644' # side-step https://github.com/k3s-io/k3s/issues/4321
......
...@@ -82,6 +82,7 @@ var _ = Describe("Verify Tailscale Configuration", Ordered, func() { ...@@ -82,6 +82,7 @@ var _ = Describe("Verify Tailscale Configuration", Ordered, func() {
Eventually(func(g Gomega) { Eventually(func(g Gomega) {
nodes, err := e2e.ParseNodes(kubeConfigFile, false) nodes, err := e2e.ParseNodes(kubeConfigFile, false)
g.Expect(err).NotTo(HaveOccurred()) g.Expect(err).NotTo(HaveOccurred())
g.Expect(len(nodes)).To(Equal(*agentCount + *serverCount))
for _, node := range nodes { for _, node := range nodes {
g.Expect(node.Status).Should(Equal("Ready")) g.Expect(node.Status).Should(Equal("Ready"))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment