Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f06b23

Browse files
committed
Fix tests
1 parent8ad39d6 commit0f06b23

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎agent/agent_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ func TestAgent_Stats_SSH(t *testing.T) {
6868
session,err:=sshClient.NewSession()
6969
require.NoError(t,err)
7070
defersession.Close()
71-
require.NoError(t,session.Run("echo test"))
71+
stdin,err:=session.StdinPipe()
72+
require.NoError(t,err)
73+
err=session.Shell()
74+
require.NoError(t,err)
7275

7376
vars*agentsdk.Stats
7477
require.Eventuallyf(t,func()bool {
@@ -78,6 +81,9 @@ func TestAgent_Stats_SSH(t *testing.T) {
7881
},testutil.WaitLong,testutil.IntervalFast,
7982
"never saw stats: %+v",s,
8083
)
84+
_=stdin.Close()
85+
err=session.Wait()
86+
require.NoError(t,err)
8187
}
8288

8389
funcTestAgent_Stats_ReconnectingPTY(t*testing.T) {

‎codersdk/deployment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,12 @@ type WorkspaceConnectionLatencyMS struct {
554554
typeDeploymentStatsstruct {
555555
// AggregatedFrom is the time in which stats are aggregated from.
556556
// This might be back in time a specific duration or interval.
557-
AggregatedFrom time.Time`json:"aggregated_since"`
557+
AggregatedFrom time.Time`json:"aggregated_since" format:"date-time"`
558558
// CollectedAt is the time in which stats are collected at.
559-
CollectedAt time.Time`json:"collected_at"`
559+
CollectedAt time.Time`json:"collected_at" format:"date-time"`
560560
// RefreshingAt is the time when the next batch of stats will
561561
// be refreshed.
562-
RefreshingAt time.Time`json:"refreshing_at"`
562+
RefreshingAt time.Time`json:"refreshing_at" format:"date-time"`
563563

564564
PendingWorkspacesint64`json:"pending_workspaces"`
565565
BuildingWorkspacesint64`json:"building_workspaces"`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp