1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

runconfig, oci, image, layer, distribution: fix empty-lines (revive)

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>
This commit is contained in:
Sebastiaan van Stijn 2022-09-23 22:37:50 +02:00
parent f63dea4337
commit 8a2e1245d4
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
8 changed files with 0 additions and 13 deletions

View file

@ -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
@ -348,7 +347,6 @@ func TestDetectManifestBlobMediaType(t *testing.T) {
assert.Equal(t, mt, tc.expected)
})
}
}
func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
@ -418,5 +416,4 @@ func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
assert.Equal(t, mt, "")
})
}
}

View file

@ -313,7 +313,6 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor,
d.err = errors.New("download cancelled during retry delay")
return
}
}
}

View file

@ -78,7 +78,6 @@ func TestFSInvalidRoot(t *testing.T) {
os.RemoveAll(root)
}
}
func TestFSMetadataGetSet(t *testing.T) {

View file

@ -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
}

View file

@ -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)
}
}

View file

@ -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 {

View file

@ -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) {

View file

@ -21,7 +21,6 @@ type f struct {
}
func TestDecodeContainerConfig(t *testing.T) {
var (
fixtures []f
image string
@ -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"`) {