From d1cd83bf0bd150c72e86de2f7b34e86f7865286d Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 7 Oct 2018 00:01:45 +0200 Subject: [PATCH] Fix tests It seems like Travis changed their infrastructure. We need to unset SSH_TTY and SSH_CLIENT to get the tests working again. --- test/segments/context.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/segments/context.spec b/test/segments/context.spec index 07300370..4dec526a 100755 --- a/test/segments/context.spec +++ b/test/segments/context.spec @@ -21,6 +21,11 @@ function tearDown() { } function testContextSegmentDoesNotGetRenderedWithDefaultUser() { + # Fix leaked state for travis + unset POWERLEVEL9K_CONTEXT_ALWAYS_SHOW + unset SSH_CLIENT + unset SSH_TTY + local DEFAULT_USER=$(whoami) local POWERLEVEL9K_CUSTOM_WORLD='echo world' local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS @@ -99,6 +104,11 @@ function testContextSegmentIsShownIfDefaultUserIsSetWhenForced() { } function testContextSegmentIsShownIfForced() { + # Fix leaked state for travis + unset POWERLEVEL9K_CONTEXT_ALWAYS_SHOW + unset SSH_CLIENT + unset SSH_TTY + local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context) local POWERLEVEL9K_ALWAYS_SHOW_USER=true