File tree 4 files changed +9
-0
lines changed 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1517,10 +1517,12 @@ func TestAgent_Lifecycle(t *testing.T) {
1517
1517
agentsdk.Manifest {
1518
1518
DERPMap : derpMap ,
1519
1519
Scripts : []codersdk.WorkspaceAgentScript {{
1520
+ ID : uuid .New (),
1520
1521
LogPath : "coder-startup-script.log" ,
1521
1522
Script : "echo 1" ,
1522
1523
RunOnStart : true ,
1523
1524
}, {
1525
+ ID : uuid .New (),
1524
1526
LogPath : "coder-shutdown-script.log" ,
1525
1527
Script : "echo " + expected ,
1526
1528
RunOnStop : true ,
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ func TestGetManifest(t *testing.T) {
108
108
}
109
109
scripts = []database.WorkspaceAgentScript {
110
110
{
111
+ ID : uuid .New (),
111
112
WorkspaceAgentID : agent .ID ,
112
113
LogSourceID : uuid .New (),
113
114
LogPath : "/cool/log/path/1" ,
@@ -119,6 +120,7 @@ func TestGetManifest(t *testing.T) {
119
120
TimeoutSeconds : 60 ,
120
121
},
121
122
{
123
+ ID : uuid .New (),
122
124
WorkspaceAgentID : agent .ID ,
123
125
LogSourceID : uuid .New (),
124
126
LogPath : "/cool/log/path/2" ,
@@ -227,6 +229,7 @@ func TestGetManifest(t *testing.T) {
227
229
}
228
230
protoScripts = []* agentproto.WorkspaceAgentScript {
229
231
{
232
+ Id : scripts [0 ].ID [:],
230
233
LogSourceId : scripts [0 ].LogSourceID [:],
231
234
LogPath : scripts [0 ].LogPath ,
232
235
Script : scripts [0 ].Script ,
@@ -237,6 +240,7 @@ func TestGetManifest(t *testing.T) {
237
240
Timeout : durationpb .New (time .Duration (scripts [0 ].TimeoutSeconds ) * time .Second ),
238
241
},
239
242
{
243
+ Id : scripts [1 ].ID [:],
240
244
LogSourceId : scripts [1 ].LogSourceID [:],
241
245
LogPath : scripts [1 ].LogPath ,
242
246
Script : scripts [1 ].Script ,
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ func AgentScriptFromProto(protoScript *proto.WorkspaceAgentScript) (codersdk.Wor
184
184
185
185
func ProtoFromScript (s codersdk.WorkspaceAgentScript ) * proto.WorkspaceAgentScript {
186
186
return & proto.WorkspaceAgentScript {
187
+ Id : s .ID [:],
187
188
DisplayName : s .DisplayName ,
188
189
LogSourceId : s .LogSourceID [:],
189
190
LogPath : s .LogPath ,
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ func TestManifest(t *testing.T) {
106
106
},
107
107
Scripts : []codersdk.WorkspaceAgentScript {
108
108
{
109
+ ID : uuid .New (),
109
110
LogSourceID : uuid .New (),
110
111
LogPath : "/var/log/script.log" ,
111
112
Script : "script" ,
@@ -116,6 +117,7 @@ func TestManifest(t *testing.T) {
116
117
Timeout : time .Second ,
117
118
},
118
119
{
120
+ ID : uuid .New (),
119
121
LogSourceID : uuid .New (),
120
122
LogPath : "/var/log/script2.log" ,
121
123
Script : "script2" ,
You can’t perform that action at this time.
0 commit comments