diff --git a/.github/workflows/openyurt-unit-test.yml b/.github/workflows/openyurt-unit-test.yml index dabfc0d7d..0ed632ce2 100644 --- a/.github/workflows/openyurt-unit-test.yml +++ b/.github/workflows/openyurt-unit-test.yml @@ -115,5 +115,5 @@ jobs: cat ~/.ssh/authorized_keys chmod og-rw ~/.ssh - cd scripts/openyurt-deployer/node + cd scripts/openyurt-deployer go test diff --git a/scripts/openyurt-deployer/node.go b/scripts/openyurt-deployer/node.go index 6ec77d75d..548ae28f3 100644 --- a/scripts/openyurt-deployer/node.go +++ b/scripts/openyurt-deployer/node.go @@ -883,7 +883,7 @@ func (node *Node) YurtWorkerJoin(addr string, port string, token string) { var err error // Get yurt template from github - yurtTempFilePath, _ := node.DownloadToTmpDir("https://raw.githubusercontent.com/vhive-serverless/vHive/main/scripts/openyurt-deployer/configs/yurtTemplate.yaml") + yurtTempFilePath, _ := node.DownloadToTmpDir("https://raw.githubusercontent.com/vhive-serverless/vHive/openyurt/scripts/openyurt-deployer/configs/yurtTemplate.yaml") // Set up Yurthub utils.WaitPrintf("Setting up Yurthub") _, err = node.ExecShellCmd( @@ -895,7 +895,7 @@ func (node *Node) YurtWorkerJoin(addr string, port string, token string) { utils.CheckErrorWithMsg(err, "Failed to set up Yurthub!\n") // Get kubele template from github - kubletTempFilePath, _ := node.DownloadToTmpDir("https://raw.githubusercontent.com/vhive-serverless/vHive/main/scripts/openyurt-deployer/configs/kubeTemplate.yaml") + kubletTempFilePath, _ := node.DownloadToTmpDir("https://raw.githubusercontent.com/vhive-serverless/vHive/openyurt/scripts/openyurt-deployer/configs/kubeTemplate.yaml") // Configure Kubelet utils.WaitPrintf("Configuring kubelet") node.ExecShellCmd("sudo mkdir -p /var/lib/openyurt && cat '%s' | sudo tee /var/lib/openyurt/kubelet.conf", kubletTempFilePath) diff --git a/scripts/openyurt-deployer/node_test.go b/scripts/openyurt-deployer/node_test.go index c78fbcb7f..55d933ff7 100644 --- a/scripts/openyurt-deployer/node_test.go +++ b/scripts/openyurt-deployer/node_test.go @@ -23,11 +23,7 @@ package main import ( - "strings" "testing" - - "github.com/sfreiberg/simplessh" - "github.com/vhive-serverless/vHive/scripts/utils" ) var githubRunner = "runner@127.0.0.1" @@ -44,18 +40,6 @@ var mockNode = Node{ }, } -func SetupSSHConn(nodeName string) *simplessh.Client { - utils.InfoPrintf("Connecting to %s\n", nodeName) - splits := strings.Split(nodeName, "@") - username := splits[0] - host := splits[1] - client, err := simplessh.ConnectWithAgent(host, username) - if err != nil { - utils.FatalPrintf("Failed to connect to: %s:%s\n", nodeName, err) - } - return client -} - func TestDetectArch(t *testing.T) { // Call the method to be tested mockNode.DetectArch()