@@ -3,6 +3,7 @@ package describe
33import (
44 "context"
55 "testing"
6+ "time"
67
78 "github.com/google/go-cmp/cmp"
89 "github.com/google/go-cmp/cmp/cmpopts"
@@ -12,6 +13,7 @@ import (
1213 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1314 "github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
1415 "github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
16+ "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1517)
1618
1719var projectIdFlag = globalflags .ProjectIdFlag
@@ -212,14 +214,30 @@ func TestOutputResult(t *testing.T) {
212214 wantErr : false ,
213215 },
214216 {
215- name : " set empty snapshot" ,
217+ name : "set empty snapshot" ,
216218 args : args {
217219 resp : & sfs.GetResourcePoolSnapshotResponse {
218220 ResourcePoolSnapshot : & sfs.ResourcePoolSnapshot {},
219221 },
220222 },
221223 wantErr : false ,
222224 },
225+ {
226+ name : "set full snapshot" ,
227+ args : args {
228+ resp : & sfs.GetResourcePoolSnapshotResponse {
229+ ResourcePoolSnapshot : & sfs.ResourcePoolSnapshot {
230+ SnapshotName : utils .Ptr ("name" ),
231+ ResourcePoolId : utils .Ptr ("rp-id" ),
232+ SizeGigabytes : utils .Ptr (int32 (10 )),
233+ LogicalSizeGigabytes : utils .Ptr (int32 (8 )),
234+ CreatedAt : utils .Ptr (time .Now ()),
235+ SnaplockExpiryTime : * sfs .NewNullableTime (utils .Ptr (time .Now ().Add (time .Hour ))),
236+ },
237+ },
238+ },
239+ wantErr : false ,
240+ },
223241 }
224242 params := testparams .NewTestParams ()
225243
0 commit comments