@@ -128,40 +128,6 @@ func TestConvertStateGolden(t *testing.T) {
128128 require .NoError (t , err )
129129
130130 require .JSONEq (t , string (expBytes ), string (gotBytes ), "converted state" )
131-
132- if expectedState , ok := expectedOutput .(* terraform.State ); ok {
133- t .Run ("WithoutGraph" , func (t * testing.T ) {
134- gotState , err := terraform .ConvertStateWithoutGraph (ctx , modules , logger )
135- require .NoError (t , err )
136- sortResources (gotState .Resources )
137-
138- for _ , res := range expectedState .Resources {
139- // Agents will not exist without the graph.
140- original := res .Agents
141- t .Cleanup (func () {
142- res .Agents = original
143- })
144- res .Agents = nil
145-
146- // Metadata will not exist without the graph.
147- originalMetadata := res .Metadata
148- t .Cleanup (func () {
149- res .Metadata = originalMetadata
150- })
151- res .Metadata = nil
152- }
153-
154- require .Equal (t , len (expectedState .Resources ), len (gotState .Resources ), "number of resources" )
155- for i := range gotState .Resources {
156- got , err := json .Marshal (gotState .Resources [i ])
157- require .NoError (t , err , "marshaling got resource to JSON" )
158- expected , err := json .Marshal (expectedState .Resources [i ])
159- require .NoError (t , err , "marshaling expected resource to JSON" )
160-
161- require .JSONEq (t , string (expected ), string (got ), "json cmp" )
162- }
163- })
164- }
165131 })
166132 }
167133 }
0 commit comments