diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 2015303d60..d544cd5eec 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -44,7 +44,6 @@ jobs: WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD) GH_TOKEN: $(GH_TOKEN) - job: macOS - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" pool: vmImage: macOS-10.14 strategy: @@ -73,7 +72,10 @@ jobs: displayName: Install dependencies - script: make test displayName: Run tests + - script: make integration-mac + displayName: Run integration tests - script: make build + condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" displayName: Build env: APPLEID: $(APPLEID) @@ -115,6 +117,15 @@ jobs: displayName: Install dependencies - script: make test displayName: Run tests + - bash: | + sudo apt-get update + sudo apt-get install libgconf-2-4 conntrack -y + curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 + sudo install minikube-linux-amd64 /usr/local/bin/minikube + sudo minikube start --driver=none + displayName: Install integration test dependencies + - script: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration-linux + displayName: Run integration tests - bash: | sudo chown root:root / sudo apt-get update && sudo apt-get install -y snapd diff --git a/main/shell-session.ts b/main/shell-session.ts index 1aca8957fe..ed13897a0a 100644 --- a/main/shell-session.ts +++ b/main/shell-session.ts @@ -160,7 +160,7 @@ export class ShellSession extends EventEmitter { } protected exit(code = 1000) { - this.websocket.close(code) + if (this.websocket.readyState == this.websocket.OPEN) this.websocket.close(code) this.emit('exit') } @@ -180,12 +180,25 @@ export class ShellSession extends EventEmitter { protected exitProcessOnWebsocketClose() { this.websocket.on("close", () => { - if (this.shellProcess) { - this.shellProcess.kill(); - } + this.killShellProcess() }) } + protected killShellProcess(){ + if(this.running) { + // On Windows we need to kill the shell process by pid, since Lens won't respond after a while if using `this.shellProcess.kill()` + if (process.platform == "win32") { + try { + process.kill(this.shellProcess.pid) + } catch(e) { + return + } + } else { + this.shellProcess.kill() + } + } + } + protected sendResponse(msg: string) { this.websocket.send("1" + Buffer.from(msg).toString("base64")) } diff --git a/main/window-manager.ts b/main/window-manager.ts index 53506785a8..8e83c3af89 100644 --- a/main/window-manager.ts +++ b/main/window-manager.ts @@ -26,7 +26,10 @@ export class WindowManager { center: true, frame: false, resizable: false, - show: false + show: false, + webPreferences: { + nodeIntegration: true + } }) if (showSplash) { this.splashWindow.loadFile(path.join(__static, "/splash.html")) diff --git a/renderer/_vue/components/AddClusterPage.vue b/renderer/_vue/components/AddClusterPage.vue index 9550af9c46..99aa013354 100644 --- a/renderer/_vue/components/AddClusterPage.vue +++ b/renderer/_vue/components/AddClusterPage.vue @@ -11,6 +11,7 @@ label="Choose config:" >