mirror of
https://github.com/containers/skopeo.git
synced 2025-09-08 01:59:41 +00:00
Fix some warnings
golangci-lint linter: unparam This primarily fixes TestProxy to test the correct image Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -188,7 +188,7 @@ func fileFromFixture(t *testing.T, inputPath string, edits map[string]string) st
|
||||
|
||||
// runDecompressDirs runs decompress-dirs.sh using exec.Command().CombinedOutput, verifies that the exit status is 0,
|
||||
// and optionally that the output matches a multi-line regexp if it is nonempty; or terminates c on failure
|
||||
func runDecompressDirs(t *testing.T, regexp string, args ...string) {
|
||||
func runDecompressDirs(t *testing.T, args ...string) {
|
||||
t.Logf("Running %s %s", decompressDirsBinary, strings.Join(args, " "))
|
||||
for i, dir := range args {
|
||||
m, err := os.ReadFile(filepath.Join(dir, "manifest.json"))
|
||||
@@ -205,9 +205,6 @@ func runDecompressDirs(t *testing.T, regexp string, args ...string) {
|
||||
require.NoError(t, err)
|
||||
t.Logf("manifest %d after: %s", i+1, string(m))
|
||||
}
|
||||
if regexp != "" {
|
||||
assert.Regexp(t, "(?s)"+regexp, string(out)) // (?s) : '.' will also match newlines
|
||||
}
|
||||
}
|
||||
|
||||
// Verify manifest in a dir: image at dir is expectedMIMEType.
|
||||
|
Reference in New Issue
Block a user