Skip to content

Commit

Permalink
Merge pull request #685 from q384566678/test
Browse files Browse the repository at this point in the history
Simplified code
  • Loading branch information
Mrunal Patel authored Mar 1, 2019
2 parents d4ec5b8 + 6dae2f0 commit 69874c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func TestCheckProcess(t *testing.T) {

func TestCheckLinux(t *testing.T) {
weightDevices := []rspec.LinuxWeightDevice{
rspec.LinuxWeightDevice{},
{},
}
weightDevices[0].Major = 5
weightDevices[0].Minor = 0
Expand Down
22 changes: 11 additions & 11 deletions validation/mounts/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,60 +15,60 @@ func main() {

// Different combinations of mount types, mount options, mount propagation modes
mounts := []rspec.Mount{
rspec.Mount{
{
Destination: "/tmp/test-shared",
Type: "tmpfs",
Source: "tmpfs",
Options: []string{"shared"},
},
rspec.Mount{
{
Destination: "/tmp/test-slave",
Type: "tmpfs",
Source: "tmpfs",
Options: []string{"slave"},
},
rspec.Mount{
{
Destination: "/tmp/test-private",
Type: "tmpfs",
Source: "tmpfs",
Options: []string{"private"},
},
rspec.Mount{
{
Destination: "/mnt/etc-shared",
Source: "/etc",
Options: []string{"bind", "shared"},
},
rspec.Mount{
{
Destination: "/mnt/etc-rshared",
Source: "/etc",
Options: []string{"rbind", "rshared"},
},
rspec.Mount{
{
Destination: "/mnt/etc-slave",
Source: "/etc",
Options: []string{"bind", "slave"},
},
rspec.Mount{
{
Destination: "/mnt/etc-rslave",
Source: "/etc",
Options: []string{"rbind", "rslave"},
},
rspec.Mount{
{
Destination: "/mnt/etc-private",
Source: "/etc",
Options: []string{"bind", "private"},
},
rspec.Mount{
{
Destination: "/mnt/etc-rprivate",
Source: "/etc",
Options: []string{"rbind", "rprivate"},
},
rspec.Mount{
{
Destination: "/mnt/etc-unbindable",
Source: "/etc",
Options: []string{"bind", "unbindable"},
},
rspec.Mount{
{
Destination: "/mnt/etc-runbindable",
Source: "/etc",
Options: []string{"rbind", "runbindable"},
Expand Down

0 comments on commit 69874c8

Please sign in to comment.