Skip to content

Commit

Permalink
runconfig, oci, image, layer, distribution: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
    runconfig/config_test.go:23:46: empty-lines: extra empty line at the start of a block (revive)
    runconfig/config_test.go:75:55: empty-lines: extra empty line at the start of a block (revive)

    oci/devices_linux.go:57:34: empty-lines: extra empty line at the start of a block (revive)
    oci/devices_linux.go:60:69: empty-lines: extra empty line at the start of a block (revive)

    image/fs_test.go:53:38: empty-lines: extra empty line at the end of a block (revive)
    image/tarexport/save.go:88:29: empty-lines: extra empty line at the end of a block (revive)

    layer/layer_unix_test.go:21:34: empty-lines: extra empty line at the end of a block (revive)

    distribution/xfer/download.go:302:9: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:154:99: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:329:52: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:354:59: empty-lines: extra empty line at the end of a block (revive)

    registry/config_test.go:323:42: empty-lines: extra empty line at the end of a block (revive)
    registry/config_test.go:350:33: empty-lines: extra empty line at the end of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 27, 2022
1 parent f63dea4 commit 8a2e124
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions distribution/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ func TestManifestStore(t *testing.T) {

err = w.Commit(ctx, desc.Size, desc.Digest, opts...)
assert.NilError(t, err)

}

// All tests should end up with no active ingest
Expand Down Expand Up @@ -348,7 +347,6 @@ func TestDetectManifestBlobMediaType(t *testing.T) {
assert.Equal(t, mt, tc.expected)
})
}

}

func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
Expand Down Expand Up @@ -418,5 +416,4 @@ func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
assert.Equal(t, mt, "")
})
}

}
1 change: 0 additions & 1 deletion distribution/xfer/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor,
d.err = errors.New("download cancelled during retry delay")
return
}

}
}

Expand Down
1 change: 0 additions & 1 deletion image/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func TestFSInvalidRoot(t *testing.T) {

os.RemoveAll(root)
}

}

func TestFSMetadataGetSet(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion image/tarexport/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ func (l *tarexporter) parseNames(names []string) (desc map[image.ID]*imageDescri
if err := addAssoc(image.IDFromDigest(id), namedRef); err != nil {
return nil, err
}

}
return imgDescr, nil
}
Expand Down
1 change: 0 additions & 1 deletion layer/layer_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ func TestLayerSize(t *testing.T) {
if expected := len(content1) + len(content2); int(layer2Size) != expected {
t.Fatalf("Unexpected size %d, expected %d", layer2Size, expected)
}

}
2 changes: 0 additions & 2 deletions oci/devices_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev
// if the device is not a device node
// try to see if it's a directory holding many devices
if err == devices.ErrNotADevice {

// check if it is a directory
if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {

// mount the internal devices recursively
// TODO check if additional errors should be handled or logged
_ = filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, _ error) error {
Expand Down
2 changes: 0 additions & 2 deletions registry/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,7 @@ func TestValidateIndexName(t *testing.T) {
if assert.Check(t, err) {
assert.Check(t, is.Equal(testCase.expect, result))
}

}

}

func TestValidateIndexNameWithError(t *testing.T) {
Expand Down
2 changes: 0 additions & 2 deletions runconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type f struct {
}

func TestDecodeContainerConfig(t *testing.T) {

var (
fixtures []f
image string
Expand Down Expand Up @@ -73,7 +72,6 @@ func TestDecodeContainerConfig(t *testing.T) {
// to the daemon in the hostConfig structure. Note this is platform specific
// as to what level of container isolation is supported.
func TestDecodeContainerConfigIsolation(t *testing.T) {

// An Invalid isolation level
if _, _, _, err := callDecodeContainerConfigIsolation("invalid"); err != nil {
if !strings.Contains(err.Error(), `Invalid isolation: "invalid"`) {
Expand Down

0 comments on commit 8a2e124

Please sign in to comment.