remove the legacy Inmem remote state

moved to a new backend
This commit is contained in:
James Bardin 2017-02-17 20:31:47 -05:00
parent d710ecbd4d
commit 7f40f90c4c
2 changed files with 0 additions and 45 deletions

View File

@ -1,32 +0,0 @@
package remote
import (
"crypto/md5"
)
// InmemClient is a Client implementation that stores data in memory.
type InmemClient struct {
Data []byte
MD5 []byte
}
func (c *InmemClient) Get() (*Payload, error) {
return &Payload{
Data: c.Data,
MD5: c.MD5,
}, nil
}
func (c *InmemClient) Put(data []byte) error {
md5 := md5.Sum(data)
c.Data = data
c.MD5 = md5[:]
return nil
}
func (c *InmemClient) Delete() error {
c.Data = nil
c.MD5 = nil
return nil
}

View File

@ -6,19 +6,6 @@ import (
"github.com/hashicorp/terraform/state"
)
func TestState(t *testing.T) {
s := &State{
Client: new(InmemClient),
state: state.TestStateInitial(),
readState: state.TestStateInitial(),
}
if err := s.PersistState(); err != nil {
t.Fatalf("err: %s", err)
}
state.TestState(t, s)
}
func TestState_impl(t *testing.T) {
var _ state.StateReader = new(State)
var _ state.StateWriter = new(State)