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:
parent
2a1e0337fd
commit
9e35bf21a3
@ -128,7 +128,7 @@ func TestListVersionsNonExistentSecret(t *testing.T) {
|
||||
|
||||
// Try to list versions of non-existent secret
|
||||
err := cli.ListVersions(cmd, "nonexistent/secret")
|
||||
assert.Error(t, err)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "not found")
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ func TestPromoteNonExistentVersion(t *testing.T) {
|
||||
|
||||
// Try to promote non-existent version
|
||||
err = cli.PromoteVersion(cmd, "test/secret", "20991231.999")
|
||||
assert.Error(t, err)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "not found")
|
||||
}
|
||||
|
||||
|
@ -50,5 +50,6 @@ func DetermineStateDir(customConfigDir string) string {
|
||||
homeDir, _ := os.UserHomeDir()
|
||||
return filepath.Join(homeDir, ".config", AppID)
|
||||
}
|
||||
|
||||
return filepath.Join(configDir, AppID)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user