MCPcopy Create free account
hub / github.com/apache/cloudstack-terraform-provider / testSetIDOnResourceData

Function testSetIDOnResourceData

cloudstack/provider_test.go:63–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func testSetIDOnResourceData(t *testing.T) {
64 d := schema.ResourceData{}
65 d.Set("id", "54711781-274e-41b2-83c0-17194d0108f7")
66
67 setValueOrID(&d, "id", "name", "54711781-274e-41b2-83c0-17194d0108f7")
68
69 if d.Get("id").(string) != "54711781-274e-41b2-83c0-17194d0108f7" {
70 t.Fatal("err: 'id' doest not match '54711781-274e-41b2-83c0-17194d0108f7'")
71 }
72}
73
74func testAccPreCheck(t *testing.T) {
75 if v := os.Getenv("CLOUDSTACK_API_URL"); v == "" {

Callers

nothing calls this directly

Calls 1

setValueOrIDFunction · 0.85

Tested by

no test coverage detected