Address a lint error
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
parent
85bfe64b90
commit
ef115ba653
|
|
@ -165,7 +165,7 @@ func TestApply_hooks(t *testing.T) {
|
|||
t.Errorf("unexpected log:\nDIFF\n%s\nEOD", diff)
|
||||
}
|
||||
} else {
|
||||
assertEqualsToSnapshot(t, "log", bs.String())
|
||||
assertLogEqualsToSnapshot(t, bs.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ func TestApply_3(t *testing.T) {
|
|||
t.Errorf("unexpected log:\nDIFF\n%s\nEOD", diff)
|
||||
}
|
||||
} else {
|
||||
assertEqualsToSnapshot(t, "log", bs.String())
|
||||
assertLogEqualsToSnapshot(t, bs.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ func TestApply_2(t *testing.T) {
|
|||
t.Errorf("unexpected log:\nDIFF\n%s\nEOD", diff)
|
||||
}
|
||||
} else {
|
||||
assertEqualsToSnapshot(t, "log", bs.String())
|
||||
assertLogEqualsToSnapshot(t, bs.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4353,7 +4353,7 @@ changing working directory back to "/path/to"
|
|||
t.Errorf("unexpected log for data defined %s:\nDIFF\n%s\nEOD", tc.loc, diff)
|
||||
}
|
||||
} else {
|
||||
assertEqualsToSnapshot(t, "log", bs.String())
|
||||
assertLogEqualsToSnapshot(t, bs.String())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ import (
|
|||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
func assertLogEqualsToSnapshot(t *testing.T, data string) {
|
||||
t.Helper()
|
||||
|
||||
assertEqualsToSnapshot(t, "log", data)
|
||||
}
|
||||
|
||||
func assertEqualsToSnapshot(t *testing.T, name string, data string) {
|
||||
type thisPkgLocator struct{}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue