8000 chore: feedback · coder/coder@525337f · GitHub
[go: up one dir, main page]

Skip to content

Commit 525337f

Browse files
chore: feedback
1 parent ece1fc0 commit 525337f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

agent/agentcontainers/api_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,12 +1667,13 @@ func TestAPI(t *testing.T) {
16671667
createErrC: make(chan error, 1),
16681668
}
16691669

1670-
testContainer = codersdk.WorkspaceAgentContainer{
1670+
containerCreatedAt = time.Now()
1671+
testContainer = codersdk.WorkspaceAgentContainer{
16711672
ID: "test-container-id",
16721673
FriendlyName: "test-container",
16731674
Image: "test-image",
16741675
Running: true,
1675-
CreatedAt: time.Now(),
1676+
CreatedAt: containerCreatedAt,
16761677
Labels: map[string]string{
16771678
agentcontainers.DevcontainerLocalFolderLabel: "/workspaces",
16781679
agentcontainers.DevcontainerConfigFileLabel: "/workspace/.devcontainer/devcontainer.json",
@@ -1693,7 +1694,7 @@ func TestAPI(t *testing.T) {
16931694
simulatedError := xerrors.New("simulated error")
16941695
mCCLI.EXPECT().DetectArchitecture(gomock.Any(), testContainer.ID).Return("", simulatedError).Times(1)
16951696

1696-
mClock.Set(time.Now()).MustWait(ctx)
1697+
mClock.Set(containerCreatedAt).MustWait(ctx)
16971698
tickerTrap := mClock.Trap().TickerFunc("updaterLoop")
16981699

16991700
api := agentcontainers.NewAPI(logger,

0 commit comments

Comments
 (0)
0