@@ -34,11 +34,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
3434 },
3535 }
3636
37- testConfigValue := tftypes .NewValue (testType , map [string ]tftypes.Value {
38- "test_computed" : tftypes .NewValue (tftypes .String , nil ),
39- "test_required" : tftypes .NewValue (tftypes .String , "test-config-value" ),
40- })
41-
4237 testStateValue := tftypes .NewValue (testType , map [string ]tftypes.Value {
4338 "test_computed" : tftypes .NewValue (tftypes .String , "test-state-value" ),
4439 "test_required" : tftypes .NewValue (tftypes .String , "test-config-value" ),
@@ -55,11 +50,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
5550 },
5651 }
5752
58- testConfig := & tfsdk.Config {
59- Raw : testConfigValue ,
60- Schema : testSchema ,
61- }
62-
6353 testState := & tfsdk.EphemeralState {
6454 Raw : testStateValue ,
6555 Schema : testSchema ,
@@ -102,39 +92,11 @@ func TestServerRenewEphemeralResource(t *testing.T) {
10292 },
10393 expectedResponse : & fwserver.RenewEphemeralResourceResponse {},
10494 },
105- "request-config" : {
106- server : & fwserver.Server {
107- Provider : & testprovider.Provider {},
108- },
109- request : & fwserver.RenewEphemeralResourceRequest {
110- Config : testConfig ,
111- State : testState ,
112- EphemeralResourceSchema : testSchema ,
113- EphemeralResource : & testprovider.EphemeralResourceWithRenew {
114- RenewMethod : func (ctx context.Context , req ephemeral.RenewRequest , resp * ephemeral.RenewResponse ) {
115- var config struct {
116- TestComputed types.String `tfsdk:"test_computed"`
117- TestRequired types.String `tfsdk:"test_required"`
118- }
119-
120- resp .Diagnostics .Append (req .Config .Get (ctx , & config )... )
121-
122- if config .TestRequired .ValueString () != "test-config-value" {
123- resp .Diagnostics .AddError ("unexpected req.Config value: %s" , config .TestRequired .ValueString ())
124- }
125- },
126- },
127- },
128- expectedResponse : & fwserver.RenewEphemeralResourceResponse {
129- Private : testEmptyPrivate ,
130- },
131- },
13295 "request-state-missing" : {
13396 server : & fwserver.Server {
13497 Provider : & testprovider.Provider {},
13598 },
13699 request : & fwserver.RenewEphemeralResourceRequest {
137- Config : testConfig ,
138100 EphemeralResourceSchema : testSchema ,
139101 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
140102 RenewMethod : func (ctx context.Context , req ephemeral.RenewRequest , resp * ephemeral.RenewResponse ) {},
@@ -155,7 +117,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
155117 Provider : & testprovider.Provider {},
156118 },
157119 request : & fwserver.RenewEphemeralResourceRequest {
158- Config : testConfig ,
159120 State : testState ,
160121 EphemeralResourceSchema : testSchema ,
161122 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -186,7 +147,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
186147 Provider : & testprovider.Provider {},
187148 },
188149 request : & fwserver.RenewEphemeralResourceRequest {
189- Config : testConfig ,
190150 State : testState ,
191151 EphemeralResourceSchema : testSchema ,
192152 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -214,7 +174,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
214174 Provider : & testprovider.Provider {},
215175 },
216176 request : & fwserver.RenewEphemeralResourceRequest {
217- Config : testConfig ,
218177 State : testState ,
219178 EphemeralResourceSchema : testSchema ,
220179 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -242,7 +201,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
242201 Provider : & testprovider.Provider {},
243202 },
244203 request : & fwserver.RenewEphemeralResourceRequest {
245- Config : testConfig ,
246204 State : testState ,
247205 EphemeralResourceSchema : testSchema ,
248206 // Doesn't implement Renew interface
@@ -265,7 +223,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
265223 Provider : & testprovider.Provider {},
266224 },
267225 request : & fwserver.RenewEphemeralResourceRequest {
268- Config : testConfig ,
269226 State : testState ,
270227 EphemeralResourceSchema : testSchema ,
271228 EphemeralResource : & testprovider.EphemeralResourceWithConfigureAndRenew {
@@ -304,7 +261,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
304261 Provider : & testprovider.Provider {},
305262 },
306263 request : & fwserver.RenewEphemeralResourceRequest {
307- Config : testConfig ,
308264 State : testState ,
309265 EphemeralResourceSchema : testSchema ,
310266 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -321,7 +277,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
321277 Provider : & testprovider.Provider {},
322278 },
323279 request : & fwserver.RenewEphemeralResourceRequest {
324- Config : testConfig ,
325280 State : testState ,
326281 EphemeralResourceSchema : testSchema ,
327282 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -350,7 +305,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
350305 Provider : & testprovider.Provider {},
351306 },
352307 request : & fwserver.RenewEphemeralResourceRequest {
353- Config : testConfig ,
354308 State : testState ,
355309 EphemeralResourceSchema : testSchema ,
356310 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
@@ -369,7 +323,6 @@ func TestServerRenewEphemeralResource(t *testing.T) {
369323 Provider : & testprovider.Provider {},
370324 },
371325 request : & fwserver.RenewEphemeralResourceRequest {
372- Config : testConfig ,
373326 State : testState ,
374327 EphemeralResourceSchema : testSchema ,
375328 EphemeralResource : & testprovider.EphemeralResourceWithRenew {
0 commit comments