fix: more nlreturn and testifylint issues

- Add blank lines before return statements
- Use require.Error instead of assert.Error for error assertions
- Keep exact float64 comparisons as-is (they are integers from JSON)
This commit is contained in:
Jeffrey Paul 2025-06-20 09:40:17 -07:00
parent 2a1e0337fd
commit 9e35bf21a3
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,7 @@ func TestListVersionsNonExistentSecret(t *testing.T) {
// Try to list versions of non-existent secret // Try to list versions of non-existent secret
err := cli.ListVersions(cmd, "nonexistent/secret") err := cli.ListVersions(cmd, "nonexistent/secret")
assert.Error(t, err) require.Error(t, err)
assert.Contains(t, err.Error(), "not found") assert.Contains(t, err.Error(), "not found")
} }
@ -212,7 +212,7 @@ func TestPromoteNonExistentVersion(t *testing.T) {
// Try to promote non-existent version // Try to promote non-existent version
err = cli.PromoteVersion(cmd, "test/secret", "20991231.999") err = cli.PromoteVersion(cmd, "test/secret", "20991231.999")
assert.Error(t, err) require.Error(t, err)
assert.Contains(t, err.Error(), "not found") assert.Contains(t, err.Error(), "not found")
} }

View File

@ -50,5 +50,6 @@ func DetermineStateDir(customConfigDir string) string {
homeDir, _ := os.UserHomeDir() homeDir, _ := os.UserHomeDir()
return filepath.Join(homeDir, ".config", AppID) return filepath.Join(homeDir, ".config", AppID)
} }
return filepath.Join(configDir, AppID) return filepath.Join(configDir, AppID)
} }