@@ -57,6 +57,7 @@ func TestClient_Devices_Get(t *testing.T) {
5757 Expires : Time {time .Date (2022 , 8 , 9 , 11 , 50 , 23 , 0 , time .UTC )},
5858 Hostname : "test" ,
5959 IsExternal : false ,
60+ ConnectedToControl : false ,
6061 LastSeen : Time {time .Date (2022 , 3 , 9 , 20 , 3 , 42 , 0 , time .UTC )},
6162 MachineKey : "mkey:test" ,
6263 NodeKey : "nodekey:test" ,
@@ -165,6 +166,7 @@ func TestClient_Devices_List(t *testing.T) {
165166 Hostname : "test" ,
166167 IsEphemeral : false ,
167168 IsExternal : false ,
169+ ConnectedToControl : false ,
168170 LastSeen : Time {time .Date (2022 , 3 , 9 , 20 , 3 , 42 , 0 , time .UTC )},
169171 MachineKey : "mkey:test" ,
170172 NodeKey : "nodekey:test" ,
@@ -233,12 +235,13 @@ func TestDevices_Unmarshal(t *testing.T) {
233235 Expires : Time {
234236 time .Date (1 , 1 , 1 , 00 , 00 , 00 , 0 , time .UTC ),
235237 },
236- Hostname : "hello" ,
237- ID : "50052" ,
238- NodeID : "nTESTJ30" ,
239- IsEphemeral : false ,
240- IsExternal : true ,
241- KeyExpiryDisabled : true ,
238+ Hostname : "hello" ,
239+ ID : "50052" ,
240+ NodeID : "nTESTJ30" ,
241+ IsEphemeral : false ,
242+ IsExternal : true ,
243+ KeyExpiryDisabled : true ,
244+ ConnectedToControl : false ,
242245 LastSeen : Time {
243246 time .Date (2022 , 4 , 15 , 13 , 24 , 40 , 0 , time .UTC ),
244247 },
@@ -260,12 +263,13 @@ func TestDevices_Unmarshal(t *testing.T) {
260263 Expires : Time {
261264 time .Date (2022 , 9 , 1 , 17 , 10 , 27 , 0 , time .UTC ),
262265 },
263- Hostname : "foo" ,
264- ID : "50053" ,
265- NodeID : "nTESTJ31" ,
266- IsEphemeral : true ,
267- IsExternal : false ,
268- KeyExpiryDisabled : true ,
266+ Hostname : "foo" ,
267+ ID : "50053" ,
268+ NodeID : "nTESTJ31" ,
269+ IsEphemeral : true ,
270+ IsExternal : false ,
271+ KeyExpiryDisabled : true ,
272+ ConnectedToControl : false ,
269273 LastSeen : Time {
270274 time .Date (2022 , 4 , 15 , 13 , 25 , 21 , 0 , time .UTC ),
271275 },
@@ -276,6 +280,31 @@ func TestDevices_Unmarshal(t *testing.T) {
276280 UpdateAvailable : false ,
277281278282 },
283+ {
284+ Addresses : []string {"100.69.123.1" , "fd7a:115c:a1e0:ab12:4843:cd96:6265:e618" },
285+ Authorized : true ,
286+ BlocksIncomingConnections : false ,
287+ ClientVersion : "1.22.2-t60b671955-gecc5d9846" ,
288+ Created : Time {
289+ time .Date (2022 , 3 , 5 , 17 , 10 , 27 , 0 , time .UTC ),
290+ },
291+ Expires : Time {
292+ time .Date (2022 , 9 , 1 , 17 , 10 , 27 , 0 , time .UTC ),
293+ },
294+ Hostname : "foo" ,
295+ ID : "50053" ,
296+ NodeID : "nTESTJ31" ,
297+ IsEphemeral : true ,
298+ IsExternal : false ,
299+ KeyExpiryDisabled : true ,
300+ ConnectedToControl : true ,
301+ MachineKey : "mkey:30dc3c061ac8b33fdc6d88a4a67b053b01b56930d78cae0cf7a164411d424c0d" ,
302+ Name : "foo.example.com" ,
303+ NodeKey : "nodekey:30dc3c061ac8b33fdc6d88a4a67b053b01b56930d78cae0cf7a164411d424c0d" ,
304+ OS : "linux" ,
305+ UpdateAvailable : false ,
306+ 307+ },
279308 },
280309 },
281310 }
0 commit comments