@@ -19,6 +19,7 @@ package testsuites
1919import (
2020 "context"
2121 "crypto/sha256"
22+ "encoding/json"
2223 "fmt"
2324
2425 "github.com/onsi/ginkgo/v2"
@@ -181,6 +182,14 @@ func (s *VolumeGroupSnapshottableTestSuite) DefineTests(driver storageframework.
181182 status := snapshot .VGS .Object ["status" ]
182183 err := framework .Gomega ().Expect (status ).NotTo (gomega .BeNil ())
183184 framework .ExpectNoError (err , "failed to get status of group snapshot" )
185+ // Marshal the object to pretty JSON
186+ jsonData , err := json .MarshalIndent (snapshot .VGS .Object , "" , " " )
187+ if err != nil {
188+ framework .Logf ("Error marshaling VGS: %v\n " , err )
189+ return
190+ }
191+
192+ framework .Logf ("VGS Details:\n %s\n " , string (jsonData ))
184193
185194 volumeListMap := snapshot .VGSContent .Object ["status" ].(map [string ]interface {})
186195 err = framework .Gomega ().Expect (volumeListMap ).NotTo (gomega .BeNil ())
@@ -196,7 +205,7 @@ func (s *VolumeGroupSnapshottableTestSuite) DefineTests(driver storageframework.
196205 volumeHandle := volume .(map [string ]interface {})["volumeHandle" ].(string )
197206 err = framework .Gomega ().Expect (volumeHandle ).NotTo (gomega .BeNil ())
198207 framework .ExpectNoError (err , "failed to get volume handle from volume" )
199- uid := snapshot .VGSContent .Object ["metadata" ].(map [string ]interface {})["uid" ].(string )
208+ uid := snapshot .VGS .Object ["metadata" ].(map [string ]interface {})["uid" ].(string )
200209 err = framework .Gomega ().Expect (uid ).NotTo (gomega .BeNil ())
201210 framework .ExpectNoError (err , "failed to get uuid from content" )
202211 volumeSnapshotName := fmt .Sprintf ("snapshot-%x" , sha256 .Sum256 ([]byte (
0 commit comments