"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/volume/azure_file/azure_file_test.go" between
kubernetes-1.18.14.tar.gz and kubernetes-1.18.15.tar.gz

About: Kubernetes is a platform for automating deployment, scaling, and operations of application containers across clusters of hosts (written in "Go"). 1.18.x series.

azure_file_test.go  (kubernetes-1.18.14):azure_file_test.go  (kubernetes-1.18.15)
skipping to change at line 374 skipping to change at line 374
tests := []struct { tests := []struct {
options []string options []string
fsGroup *int64 fsGroup *int64
expected []string expected []string
}{ }{
{ {
options: []string{"dir_mode=0777"}, options: []string{"dir_mode=0777"},
fsGroup: nil, fsGroup: nil,
expected: []string{"dir_mode=0777", expected: []string{"dir_mode=0777",
fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", fileMode, defaultFileMode),
fmt.Sprintf("%s=%s", vers, defaultVers)}, fmt.Sprintf("%s=%s", vers, defaultVers),
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
}, },
{ {
options: []string{"file_mode=0777"}, options: []string{"file_mode=0777"},
fsGroup: to.Int64Ptr(0), fsGroup: to.Int64Ptr(0),
expected: []string{"file_mode=0777", expected: []string{"file_mode=0777",
fmt.Sprintf("%s=%s", dirMode, defaultDirMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode),
fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", vers, defaultVers),
fmt.Sprintf("%s=0", gid)}, fmt.Sprintf("%s=0", gid),
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
}, },
{ {
options: []string{"vers=2.1"}, options: []string{"vers=2.1"},
fsGroup: to.Int64Ptr(1000), fsGroup: to.Int64Ptr(1000),
expected: []string{"vers=2.1", expected: []string{"vers=2.1",
fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", fileMode, defaultFileMode),
fmt.Sprintf("%s=%s", dirMode, defaultDirMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode),
fmt.Sprintf("%s=1000", gid)}, fmt.Sprintf("%s=1000", gid),
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
}, },
{ {
options: []string{""}, options: []string{""},
expected: []string{"", fmt.Sprintf("%s=%s", expected: []string{"", fmt.Sprintf("%s=%s",
fileMode, defaultFileMode), fileMode, defaultFileMode),
fmt.Sprintf("%s=%s", dirMode, defaultDirMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode),
fmt.Sprintf("%s=%s", vers, defaultVers)}, fmt.Sprintf("%s=%s", vers, defaultVers),
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
}, },
{ {
options: []string{"file_mode=0777", "dir_mode=0777"}, options: []string{"file_mode=0777", "dir_mode=0777"},
expected: []string{"file_mode=0777", "dir_mode=0777", fmt expected: []string{"file_mode=0777", "dir_mode=0777",
.Sprintf("%s=%s", vers, defaultVers)}, fmt.Sprintf("%s=%s", vers, defaultVers),
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
}, },
{ {
options: []string{"gid=2000"}, options: []string{"gid=2000"},
fsGroup: to.Int64Ptr(1000), fsGroup: to.Int64Ptr(1000),
expected: []string{"gid=2000", expected: []string{"gid=2000",
fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", fileMode, defaultFileMode),
fmt.Sprintf("%s=%s", dirMode, defaultDirMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode),
"vers=3.0"}, "vers=3.0",
fmt.Sprintf("%s=%s", actimeo, defaultActimeo),
mfsymlinks,
},
},
{
options: []string{"actimeo=3"},
expected: []string{
"actimeo=3",
fmt.Sprintf("%s=%s", fileMode, defaultFileMode),
fmt.Sprintf("%s=%s", dirMode, defaultDirMode),
fmt.Sprintf("%s=%s", vers, defaultVers),
mfsymlinks,
},
}, },
} }
for _, test := range tests { for _, test := range tests {
result := appendDefaultMountOptions(test.options, test.fsGroup) result := appendDefaultMountOptions(test.options, test.fsGroup)
if !reflect.DeepEqual(result, test.expected) { if !reflect.DeepEqual(result, test.expected) {
t.Errorf("input: %q, appendDefaultMountOptions result: %q , expected: %q", test.options, result, test.expected) t.Errorf("input: %q, appendDefaultMountOptions result: %q , expected: %q", test.options, result, test.expected)
} }
} }
} }
 End of changes. 6 change blocks. 
8 lines changed or deleted 36 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)