File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,10 @@ func TestAgent_Stats_SSH(t *testing.T) {
68
68
session , err := sshClient .NewSession ()
69
69
require .NoError (t , err )
70
70
defer session .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 )
72
75
73
76
var s * agentsdk.Stats
74
77
require .Eventuallyf (t , func () bool {
@@ -78,6 +81,9 @@ func TestAgent_Stats_SSH(t *testing.T) {
78
81
}, testutil .WaitLong , testutil .IntervalFast ,
79
82
"never saw stats: %+v" , s ,
80
83
)
84
+ _ = stdin .Close ()
85
+ err = session .Wait ()
86
+ require .NoError (t , err )
81
87
}
82
88
83
89
func TestAgent_Stats_ReconnectingPTY (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -554,12 +554,12 @@ type WorkspaceConnectionLatencyMS struct {
554
554
type DeploymentStats struct {
555
555
// AggregatedFrom is the time in which stats are aggregated from.
556
556
// 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" `
558
558
// 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" `
560
560
// RefreshingAt is the time when the next batch of stats will
561
561
// be refreshed.
562
- RefreshingAt time.Time `json:"refreshing_at"`
562
+ RefreshingAt time.Time `json:"refreshing_at" format:"date-time" `
563
563
564
564
PendingWorkspaces int64 `json:"pending_workspaces"`
565
565
BuildingWorkspaces int64 `json:"building_workspaces"`
You can’t perform that action at this time.
0 commit comments