Skip to content

Commit a35c2e7

Browse files
authored
campaigns: temporary switch back to bind for non-root (#437)
This can be reverted once we land #434.
1 parent 51aaa5a commit a35c2e7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

internal/campaigns/workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func detectBestWorkspaceCreator(ctx context.Context, steps []Step) workspaceCrea
128128
}
129129

130130
uids[uid] = struct{}{}
131-
if len(uids) > 1 {
131+
if len(uids) > 1 || uid != 0 {
132132
return workspaceCreatorBind
133133
}
134134
}

internal/campaigns/workspace_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ func TestBestWorkspaceCreator(t *testing.T) {
3434
"same user": {
3535
behaviours: map[string]expect.Behaviour{
3636
"foo": {Stdout: []byte("1000\n")},
37-
"bar": {Stdout: []byte("1000\n")},
3837
},
39-
want: workspaceCreatorVolume,
38+
want: workspaceCreatorBind,
4039
},
4140
"different user": {
4241
behaviours: map[string]expect.Behaviour{
43-
"foo": {Stdout: []byte("1000\n")},
44-
"bar": {Stdout: []byte("0\n")},
42+
"foo": {Stdout: []byte("0\n")},
43+
"bar": {Stdout: []byte("1000\n")},
4544
},
4645
want: workspaceCreatorBind,
4746
},

0 commit comments

Comments
 (0)