github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/builtin/providers/google/config_test.go (about)

     1  package google
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  func TestConfigLoadJSON_account(t *testing.T) {
     9  	var actual accountFile
    10  	if err := loadJSON(&actual, "./test-fixtures/fake_account.json"); err != nil {
    11  		t.Fatalf("err: %s", err)
    12  	}
    13  
    14  	expected := accountFile{
    15  		PrivateKeyId: "foo",
    16  		PrivateKey:   "bar",
    17  		ClientEmail:  "foo@bar.com",
    18  		ClientId:     "id@foo.com",
    19  	}
    20  
    21  	if !reflect.DeepEqual(actual, expected) {
    22  		t.Fatalf("bad: %#v", actual)
    23  	}
    24  }