github.com/ctrox/terraform@v0.11.12-beta1/state/remote/file_test.go (about) 1 package remote 2 3 import ( 4 "io/ioutil" 5 "os" 6 "testing" 7 ) 8 9 func TestFileClient_impl(t *testing.T) { 10 var _ Client = new(FileClient) 11 } 12 13 func TestFileClient(t *testing.T) { 14 tf, err := ioutil.TempFile("", "tf") 15 if err != nil { 16 t.Fatalf("err: %s", err) 17 } 18 tf.Close() 19 defer os.Remove(tf.Name()) 20 21 client, err := fileFactory(map[string]string{ 22 "path": tf.Name(), 23 }) 24 if err != nil { 25 t.Fatalf("bad: %s", err) 26 } 27 28 testClient(t, client) 29 }