Skip to content

Commit

Permalink
internal: Implement fwserver UpgradeResourceState testing and update …
Browse files Browse the repository at this point in the history
…proto6server testing (#356)

Reference: #215
  • Loading branch information
bflad authored May 31, 2022
1 parent 051bdd7 commit 24042ec
Show file tree
Hide file tree
Showing 8 changed files with 866 additions and 648 deletions.
22 changes: 22 additions & 0 deletions internal/fwserver/proto6_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package fwserver_test

import (
"encoding/json"
"testing"

"github.com/hashicorp/terraform-plugin-go/tfprotov6"
)

func testNewRawState(t *testing.T, jsonMap map[string]interface{}) *tfprotov6.RawState {
t.Helper()

rawStateJSON, err := json.Marshal(jsonMap)

if err != nil {
t.Fatalf("unable to create RawState JSON: %s", err)
}

return &tfprotov6.RawState{
JSON: rawStateJSON,
}
}
Loading

0 comments on commit 24042ec

Please sign in to comment.