terraform: sanity test (passes, always passed)

This commit is contained in:
Mitchell Hashimoto 2016-10-09 10:05:58 +08:00
parent c2dd9a7338
commit 30596ca371
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 12 additions and 0 deletions

View File

@ -62,6 +62,10 @@ func (r *RawConfig) RawMap() map[string]interface{} {
// Copy returns a copy of this RawConfig, uninterpolated.
func (r *RawConfig) Copy() *RawConfig {
if r == nil {
return nil
}
r.lock.Lock()
defer r.lock.Unlock()

View File

@ -247,6 +247,14 @@ func TestResourceConfigDeepCopy_nil(t *testing.T) {
}
}
func TestResourceConfigDeepCopy_nilComputed(t *testing.T) {
rc := &ResourceConfig{}
actual := rc.DeepCopy()
if actual.ComputedKeys != nil {
t.Fatalf("bad: %#v", actual)
}
}
func TestResourceConfigEqual_nil(t *testing.T) {
var nilRc *ResourceConfig
notNil := NewResourceConfig(nil)