(t *testing.T)
| 3317 | } |
| 3318 | |
| 3319 | func TestInstallSkipConfigModification(t *testing.T) { |
| 3320 | markTestForSharding(t, 14) |
| 3321 | defer testutils.BackupAndRestore(t)() |
| 3322 | tester := zshTester{} |
| 3323 | |
| 3324 | // Install and check that it gave info on how to configure the shell |
| 3325 | out := tester.RunInteractiveShell(t, ` /tmp/client install --skip-config-modification | grep -v "secret hishtory key"`) |
| 3326 | testutils.CompareGoldens(t, out, "TestInstallSkipConfigModification-InstallOutput-"+runtime.GOOS) |
| 3327 | |
| 3328 | // Check that the shell config files weren't configured |
| 3329 | homedir, err := os.UserHomeDir() |
| 3330 | require.NoError(t, err) |
| 3331 | shellConfigFiles := []string{ |
| 3332 | path.Join(homedir, ".zshrc"), |
| 3333 | path.Join(homedir, ".bashrc"), |
| 3334 | path.Join(homedir, ".bash_profile"), |
| 3335 | path.Join(homedir, ".config/fish/config.fish"), |
| 3336 | } |
| 3337 | for _, file := range shellConfigFiles { |
| 3338 | fileContents, err := os.ReadFile(file) |
| 3339 | require.NoError(t, err) |
| 3340 | require.NotContains(t, fileContents, "hishtory") |
| 3341 | } |
| 3342 | } |
| 3343 | |
| 3344 | func TestConfigLogLevel(t *testing.T) { |
| 3345 | markTestForSharding(t, 16) |
nothing calls this directly
no test coverage detected