1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

fix(tests): binds are not sorted

That creates false negative in test runs. Just keep one, there is no
value in having more.
This commit is contained in:
Earl Warren 2025-01-22 22:24:27 +01:00
parent d92e4a8aff
commit e0facd1ee5

View file

@ -258,13 +258,13 @@ func TestMergeJobOptions(t *testing.T) {
}{ }{
{ {
name: "ok", name: "ok",
options: "--volume /foo:/bar --volume /frob:/nitz --volume somevolume --tmpfs /tmp:exec,noatime --hostname alternatehost", options: "--volume /frob:/nitz --volume somevolume --tmpfs /tmp:exec,noatime --hostname alternatehost",
config: &container.Config{ config: &container.Config{
Volumes: map[string]struct{}{"somevolume": {}}, Volumes: map[string]struct{}{"somevolume": {}},
Hostname: "alternatehost", Hostname: "alternatehost",
}, },
hostConfig: &container.HostConfig{ hostConfig: &container.HostConfig{
Binds: []string{"/foo:/bar", "/frob:/nitz"}, Binds: []string{"/frob:/nitz"},
Tmpfs: map[string]string{"/tmp": "exec,noatime"}, Tmpfs: map[string]string{"/tmp": "exec,noatime"},
}, },
}, },