From 56d1401966d886c0f0fec54e89705c0d99ef37d2 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 2 Jun 2024 19:36:02 -0700 Subject: [PATCH] Update golden names to fork on OS --- client/client_test.go | 2 +- ...nstallSkipConfigModification-InstallOutput | 23 ----------------- ...kipConfigModification-InstallOutput-darwin | 25 +++++++++++++++++++ ...SkipConfigModification-InstallOutput-linux | 25 +++++++++++++++++++ 4 files changed, 51 insertions(+), 24 deletions(-) delete mode 100644 client/testdata/TestInstallSkipConfigModification-InstallOutput create mode 100644 client/testdata/TestInstallSkipConfigModification-InstallOutput-darwin create mode 100644 client/testdata/TestInstallSkipConfigModification-InstallOutput-linux diff --git a/client/client_test.go b/client/client_test.go index 0d58aa0..83665ef 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -3196,7 +3196,7 @@ func TestInstallSkipConfigModification(t *testing.T) { // Install and check that it gave info on how to configure the shell out := tester.RunInteractiveShell(t, ` /tmp/client install --skip-config-modification | grep -v "secret hishtory key"`) - testutils.CompareGoldens(t, out, "TestInstallSkipConfigModification-InstallOutput") + testutils.CompareGoldens(t, out, "TestInstallSkipConfigModification-InstallOutput-"+runtime.GOOS) // Check that the shell config files weren't configured homedir, err := os.UserHomeDir() diff --git a/client/testdata/TestInstallSkipConfigModification-InstallOutput b/client/testdata/TestInstallSkipConfigModification-InstallOutput deleted file mode 100644 index 327a5b3..0000000 --- a/client/testdata/TestInstallSkipConfigModification-InstallOutput +++ /dev/null @@ -1,23 +0,0 @@ -Please edit "~/.bashrc" to add: - -``` -# Hishtory Config: -export PATH="$PATH:/Users/david/.hishtory" -source /Users/david/.hishtory/config.sh -``` - -Please edit "~/.zshrc" to add: - -``` -# Hishtory Config: -export PATH="$PATH:/Users/david/.hishtory" -source /Users/david/.hishtory/config.zsh -``` - -Please edit "~/.config/fish/config.fish" to add: - -``` -# Hishtory Config: -export PATH="$PATH:/Users/david/.hishtory" -source /Users/david/.hishtory/config.fish -``` diff --git a/client/testdata/TestInstallSkipConfigModification-InstallOutput-darwin b/client/testdata/TestInstallSkipConfigModification-InstallOutput-darwin new file mode 100644 index 0000000..b3f6c36 --- /dev/null +++ b/client/testdata/TestInstallSkipConfigModification-InstallOutput-darwin @@ -0,0 +1,25 @@ +Please edit "~/.bashrc" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/Users/runner/.hishtory" +source /Users/runner/.hishtory/config.sh +``` + +Please edit "~/.bash_profile" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/Users/runner/.hishtory" +source /Users/runner/.hishtory/config.sh +``` + +Please edit "~/.zshrc" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/Users/runner/.hishtory" +source /Users/runner/.hishtory/config.zsh +``` + + diff --git a/client/testdata/TestInstallSkipConfigModification-InstallOutput-linux b/client/testdata/TestInstallSkipConfigModification-InstallOutput-linux new file mode 100644 index 0000000..5d4e53f --- /dev/null +++ b/client/testdata/TestInstallSkipConfigModification-InstallOutput-linux @@ -0,0 +1,25 @@ +Please edit "~/.bashrc" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/home/runner/.hishtory" +source /home/runner/.hishtory/config.sh +``` + +Please edit "~/.bash_profile" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/home/runner/.hishtory" +source /home/runner/.hishtory/config.sh +``` + +Please edit "~/.zshrc" to add: + +``` +# Hishtory Config: +export PATH="$PATH:/home/runner/.hishtory" +source /home/runner/.hishtory/config.zsh +``` + +