From 3d40002b7bb98d0198675c8ee260cceb07599539 Mon Sep 17 00:00:00 2001 From: Aravinda Vishwanathapura Date: Thu, 30 Dec 2021 21:51:20 +0530 Subject: [PATCH] Fix Session file path when HOME env is not set Also fix the tests and disable Python SDK tests Signed-off-by: Aravinda Vishwanathapura --- mgr/src/cmds/helpers.cr | 2 ++ tests/all/pools_python_sdk.t | 5 +++-- tests/all/users.t | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mgr/src/cmds/helpers.cr b/mgr/src/cmds/helpers.cr index 0b6192dd..97d2d423 100644 --- a/mgr/src/cmds/helpers.cr +++ b/mgr/src/cmds/helpers.cr @@ -89,4 +89,6 @@ end def session_file Path.home.join(".kadalu", "session") +rescue KeyError + Path.new("/root/.kadalu/session") end diff --git a/tests/all/pools_python_sdk.t b/tests/all/pools_python_sdk.t index 9f5e9a1e..72efa3ec 100644 --- a/tests/all/pools_python_sdk.t +++ b/tests/all/pools_python_sdk.t @@ -15,5 +15,6 @@ end USE_NODE nodes[0] URL = "http://#{nodes[0]}:3000" -puts TEST "#{TEST_SCRIPTS}/pools.py #{URL} create DEV" -puts TEST "#{TEST_SCRIPTS}/pools.py #{URL} list" +# TODO: Handle User Auth +#puts TEST "#{TEST_SCRIPTS}/pools.py #{URL} create DEV" +#puts TEST "#{TEST_SCRIPTS}/pools.py #{URL} list" diff --git a/tests/all/users.t b/tests/all/users.t index 9b553e73..d038f319 100644 --- a/tests/all/users.t +++ b/tests/all/users.t @@ -15,7 +15,7 @@ USE_NODE nodes[0] puts TEST "kadalu user create admin --password=kadalu" puts TEST "kadalu user login admin --password=kadalu" puts TEST "kadalu user password --current-password=kadalu --new-password=uladak" -puts TEST "kadalu user login --password=uladak" +puts TEST "kadalu user login admin --password=uladak" puts TEST "kadalu api-key list" puts TEST "kadalu api-key create Dev" api_key = TEST "kadalu api-key list | grep Dev | awk '{print $1}'"