https://goreportcard.com/report/github.com/docker/docker
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -53,7 +53,7 @@ func TestAdjustForAPIVersion(t *testing.T) {
|
| 53 | 53 |
Target: "/bar", |
| 54 | 54 |
TmpfsOptions: &mount.TmpfsOptions{
|
| 55 | 55 |
Options: [][]string{
|
| 56 |
- []string{"exec"},
|
|
| 56 |
+ {"exec"},
|
|
| 57 | 57 |
}, |
| 58 | 58 |
}, |
| 59 | 59 |
}, |
| ... | ... |
@@ -73,7 +73,7 @@ func TestAdjustForAPIVersion(t *testing.T) {
|
| 73 | 73 |
adjustForAPIVersion("1.46", spec)
|
| 74 | 74 |
if !reflect.DeepEqual( |
| 75 | 75 |
spec.TaskTemplate.ContainerSpec.Mounts[0].TmpfsOptions.Options, |
| 76 |
- [][]string{[]string{"exec"}},
|
|
| 76 |
+ [][]string{{"exec"}},
|
|
| 77 | 77 |
) {
|
| 78 | 78 |
t.Error("TmpfsOptions.Options was stripped from spec")
|
| 79 | 79 |
} |
| ... | ... |
@@ -8,8 +8,8 @@ import ( |
| 8 | 8 |
|
| 9 | 9 |
func TestTmpfsOptionsToGRPC(t *testing.T) {
|
| 10 | 10 |
options := [][]string{
|
| 11 |
- []string{"noexec"},
|
|
| 12 |
- []string{"uid", "12345"},
|
|
| 11 |
+ {"noexec"},
|
|
| 12 |
+ {"uid", "12345"},
|
|
| 13 | 13 |
} |
| 14 | 14 |
|
| 15 | 15 |
expected := `[["noexec"],["uid","12345"]]` |
| ... | ... |
@@ -21,8 +21,8 @@ func TestTmpfsOptionsFromGRPC(t *testing.T) {
|
| 21 | 21 |
options := `[["noexec"],["uid","12345"]]` |
| 22 | 22 |
|
| 23 | 23 |
expected := [][]string{
|
| 24 |
- []string{"noexec"},
|
|
| 25 |
- []string{"uid", "12345"},
|
|
| 24 |
+ {"noexec"},
|
|
| 25 |
+ {"uid", "12345"},
|
|
| 26 | 26 |
} |
| 27 | 27 |
actual := tmpfsOptionsFromGRPC(options) |
| 28 | 28 |
|
| ... | ... |
@@ -167,7 +167,7 @@ func TestTmpfsConversion(t *testing.T) {
|
| 167 | 167 |
Target: "/bar", |
| 168 | 168 |
Type: mount.TypeTmpfs, |
| 169 | 169 |
TmpfsOptions: &mount.TmpfsOptions{
|
| 170 |
- Options: [][]string{[]string{"exec"}},
|
|
| 170 |
+ Options: [][]string{{"exec"}},
|
|
| 171 | 171 |
}, |
| 172 | 172 |
}, |
| 173 | 173 |
}, |
| ... | ... |
@@ -190,7 +190,7 @@ func TestTmpfsConversion(t *testing.T) {
|
| 190 | 190 |
Target: "/bar", |
| 191 | 191 |
Type: mount.TypeTmpfs, |
| 192 | 192 |
TmpfsOptions: &mount.TmpfsOptions{
|
| 193 |
- Options: [][]string{[]string{"noexec"}},
|
|
| 193 |
+ Options: [][]string{{"noexec"}},
|
|
| 194 | 194 |
}, |
| 195 | 195 |
}, |
| 196 | 196 |
}, |
| ... | ... |
@@ -108,10 +108,10 @@ func TestSaveOCI(t *testing.T) {
|
| 108 | 108 |
|
| 109 | 109 |
testCases := []testCase{
|
| 110 | 110 |
// Busybox by tagged name |
| 111 |
- testCase{image: busybox, expectedContainerdRef: "docker.io/library/busybox:latest", expectedOCIRef: "latest"},
|
|
| 111 |
+ {image: busybox, expectedContainerdRef: "docker.io/library/busybox:latest", expectedOCIRef: "latest"},
|
|
| 112 | 112 |
|
| 113 | 113 |
// Busybox by ID |
| 114 |
- testCase{image: inspectBusybox.ID},
|
|
| 114 |
+ {image: inspectBusybox.ID},
|
|
| 115 | 115 |
} |
| 116 | 116 |
|
| 117 | 117 |
if testEnv.DaemonInfo.OSType != "windows" {
|