mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
state/remote: passing Atlas state test
This commit is contained in:
parent
aaf182a4a7
commit
bfe0edef51
@ -3,11 +3,19 @@ package remote
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/state"
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
)
|
||||
|
||||
// testClient is a generic function to test any client.
|
||||
func testClient(t *testing.T, c Client) {
|
||||
data := []byte("foo")
|
||||
var buf bytes.Buffer
|
||||
s := state.TestStateInitial()
|
||||
if err := terraform.WriteState(s, &buf); err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
data := buf.Bytes()
|
||||
|
||||
if err := c.Put(data); err != nil {
|
||||
t.Fatalf("put: %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user