From 101f582196a161a06b62b38fe55c7f8c0a04b54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 15 Apr 2021 20:09:54 +0200 Subject: [PATCH] Use known cookie when starting runtimes (#199) --- .github/workflows/test.yaml | 2 +- lib/livebook/runtime/standalone_init.ex | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 62fb58219..26bb9152a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: - name: Check formatting run: mix format --check-formatted - name: Run tests - run: mix test + run: elixir --cookie "COOKIEFORTESTS" -S mix test - name: Install Node uses: actions/setup-node@v2 with: diff --git a/lib/livebook/runtime/standalone_init.ex b/lib/livebook/runtime/standalone_init.ex index e75917394..db81fc69c 100644 --- a/lib/livebook/runtime/standalone_init.ex +++ b/lib/livebook/runtime/standalone_init.ex @@ -54,7 +54,10 @@ defmodule Livebook.Runtime.StandaloneInit do # Enable ANSI escape codes as we handle them with HTML. "+sbwt none +sbwtdcpu none +sbwtdio none -elixir ansi_enabled true", # Make the node hidden, so it doesn't automatically join the cluster - "--hidden" + "--hidden", + # Use the cookie in Livebook + "--cookie", + Atom.to_string(Node.get_cookie()) ] end