Skip to content

Commit

Permalink
chore: Fix new linter issues (#2998)
Browse files Browse the repository at this point in the history
* chore: Fix new linter issues

Signed-off-by: Dominik Schulz <[email protected]>

* fix: Do not use JSONeq for mixed content

Signed-off-by: Dominik Schulz <[email protected]>

---------

Signed-off-by: Dominik Schulz <[email protected]>
  • Loading branch information
dominikschulz authored Nov 24, 2024
1 parent 9f3b2d3 commit cd6006a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/gopass/secrets/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestYAMLKeyToEmptySecret(t *testing.T) {
// read back key
v, ok := s.Get(yamlKey)
assert.True(t, ok)
assert.Equal(t, yamlValue, v)
assert.YAMLEq(t, yamlValue, v)

// read back whole entry
want := "\n---\n" + yamlKey + ": " + yamlValue + "\n"
Expand Down Expand Up @@ -155,17 +155,17 @@ func TestYAMLSetMultipleKeys(t *testing.T) {
}

// read back the password
assert.Equal(t, yamlPassword, s.Password())
assert.YAMLEq(t, yamlPassword, s.Password())

// read back the keys
for _, key := range keys {
v, ok := s.Get(key)
assert.True(t, ok)
assert.Equal(t, yamlValue, v)
assert.YAMLEq(t, yamlValue, v)
}

// read back whole entry
assert.Equal(t, b.String(), string(s.Bytes()))
assert.YAMLEq(t, b.String(), string(s.Bytes()))
}

func TestYAMLMultilineWithDashes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tests/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ glossary": {
// using show -n to disable parsing
out, err = ts.run("show -f -n some/json")
require.NoError(t, err)
assert.Equal(t, json, out)
assert.Equal(t, json, out) //nolint:testifylint
})

t.Run("Regression test for #1600", func(t *testing.T) {
Expand Down

0 comments on commit cd6006a

Please sign in to comment.