- Notifications
You must be signed in to change notification settings - Fork1k
fix: resolveTestAPI/Error/DuringInjection
flake#19407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2096,9 +2096,6 @@ func TestAPI(t *testing.T) { | ||
} | ||
) | ||
Comment on lines -2099 to -2100 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It looks like this might sometimes be a symlink which we aren't resolving which causes a problem in the tests on nightly gauntlet. Instead of resolving this symlink, I've just removed this and replaced the mock expectation with | ||
// Mock the `List` function to always return the test container. | ||
mCCLI.EXPECT().List(gomock.Any()).Return(codersdk.WorkspaceAgentListContainersResponse{ | ||
Containers: []codersdk.WorkspaceAgentContainer{testContainer}, | ||
@@ -2139,7 +2136,7 @@ func TestAPI(t *testing.T) { | ||
require.Equal(t, http.StatusOK, rec.Code) | ||
var response codersdk.WorkspaceAgentListContainersResponse | ||
err:= json.NewDecoder(rec.Body).Decode(&response) | ||
require.NoError(t, err) | ||
// Then: We expect that there will be an error associated with the devcontainer. | ||
@@ -2149,16 +2146,16 @@ func TestAPI(t *testing.T) { | ||
gomock.InOrder( | ||
mCCLI.EXPECT().DetectArchitecture(gomock.Any(), testContainer.ID).Return(runtime.GOARCH, nil), | ||
mCCLI.EXPECT().ExecAs(gomock.Any(), testContainer.ID, "root", "mkdir", "-p", "/.coder-agent").Return(nil, nil), | ||
mCCLI.EXPECT().Copy(gomock.Any(), testContainer.ID,gomock.Any(), "/.coder-agent/coder").Return(nil), | ||
mCCLI.EXPECT().ExecAs(gomock.Any(), testContainer.ID, "root", "chmod", "0755", "/.coder-agent", "/.coder-agent/coder").Return(nil, nil), | ||
mCCLI.EXPECT().ExecAs(gomock.Any(), testContainer.ID, "root", "/bin/sh", "-c", "chown $(id -u):$(id -g) /.coder-agent/coder").Return(nil, nil), | ||
) | ||
// Given: We allow creation to succeed. | ||
testutil.RequireSend(ctx, t, fSAC.createErrC, nil) | ||
err = api.RefreshContainers(ctx) | ||
require.NoError(t, err) | ||
Comment on lines +2157 to +2158 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. drive by fix: whilst trying to recreate this flake, i got this to fail because the clock would skip a turn for some reason, so instead we just invoke | ||
req = httptest.NewRequest(http.MethodGet, "/", nil) | ||
rec = httptest.NewRecorder() | ||
Uh oh!
There was an error while loading.Please reload this page.