MCPcopy
hub / github.com/Azure/aztfexport / newConfigInfo

Function newConfigInfo

internal/meta/config_info_test.go:22–39  ·  view source on GitHub ↗
(azid, tfid, tfaddr, hcl string, deps *Dependencies)

Source from the content-addressed store, hash-verified

20}
21
22func newConfigInfo(azid, tfid, tfaddr, hcl string, deps *Dependencies) ConfigInfo {
23 cinfo := ConfigInfo{
24 ImportItem: ImportItem{
25 AzureResourceID: mustParseResourceId(azid),
26 TFResourceId: tfid,
27 TFAddr: mustParseTFAddr(tfaddr),
28 },
29 HCL: mustHclWriteParse(hcl),
30 Dependencies: Dependencies{
31 ByIdRef: make(map[string]Dependency),
32 ByIdRefAmbiguous: make(map[string][]Dependency),
33 },
34 }
35 if deps != nil {
36 cinfo.Dependencies = *deps
37 }
38 return cinfo
39}
40
41func TestConfigInfos_PopulateReferenceDeps(t *testing.T) {
42 testCases := []struct {

Calls 3

mustParseResourceIdFunction · 0.85
mustParseTFAddrFunction · 0.85
mustHclWriteParseFunction · 0.85

Tested by

no test coverage detected