File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1667,12 +1667,13 @@ func TestAPI(t *testing.T) {
1667
1667
createErrC : make (chan error , 1 ),
1668
1668
}
1669
1669
1670
- testContainer = codersdk.WorkspaceAgentContainer {
1670
+ containerCreatedAt = time .Now ()
1671
+ testContainer = codersdk.WorkspaceAgentContainer {
1671
1672
ID : "test-container-id" ,
1672
1673
FriendlyName : "test-container" ,
1673
1674
Image : "test-image" ,
1674
1675
Running : true ,
1675
- CreatedAt : time . Now () ,
1676
+ CreatedAt : containerCreatedAt ,
1676
1677
Labels : map [string ]string {
1677
1678
agentcontainers .DevcontainerLocalFolderLabel : "/workspaces" ,
1678
1679
agentcontainers .DevcontainerConfigFileLabel : "/workspace/.devcontainer/devcontainer.json" ,
@@ -1693,7 +1694,7 @@ func TestAPI(t *testing.T) {
1693
1694
simulatedError := xerrors .New ("simulated error" )
1694
1695
mCCLI .EXPECT ().DetectArchitecture (gomock .Any (), testContainer .ID ).Return ("" , simulatedError ).Times (1 )
1695
1696
1696
- mClock .Set (time . Now () ).MustWait (ctx )
1697
+ mClock .Set (containerCreatedAt ).MustWait (ctx )
1697
1698
tickerTrap := mClock .Trap ().TickerFunc ("updaterLoop" )
1698
1699
1699
1700
api := agentcontainers .NewAPI (logger ,
You can’t perform that action at this time.
0 commit comments