(t *testing.T)
| 423 | } |
| 424 | |
| 425 | func TestExpandUnknownBodies(t *testing.T) { |
| 426 | srcContent := &hcl.BodyContent{ |
| 427 | Blocks: hcl.Blocks{ |
| 428 | { |
| 429 | Type: "dynamic", |
| 430 | Labels: []string{"list"}, |
| 431 | LabelRanges: []hcl.Range{hcl.Range{}}, |
| 432 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 433 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 434 | "for_each": hcltest.MockExprLiteral(cty.UnknownVal(cty.Map(cty.String))), |
| 435 | }), |
| 436 | Blocks: hcl.Blocks{ |
| 437 | { |
| 438 | Type: "content", |
| 439 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 440 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 441 | "val": hcltest.MockExprTraversalSrc("each.value"), |
| 442 | }), |
| 443 | }), |
| 444 | }, |
| 445 | }, |
| 446 | }), |
| 447 | }, |
| 448 | { |
| 449 | Type: "dynamic", |
| 450 | Labels: []string{"tuple"}, |
| 451 | LabelRanges: []hcl.Range{hcl.Range{}}, |
| 452 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 453 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 454 | "for_each": hcltest.MockExprLiteral(cty.UnknownVal(cty.Map(cty.String))), |
| 455 | }), |
| 456 | Blocks: hcl.Blocks{ |
| 457 | { |
| 458 | Type: "content", |
| 459 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 460 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 461 | "val": hcltest.MockExprTraversalSrc("each.value"), |
| 462 | }), |
| 463 | }), |
| 464 | }, |
| 465 | }, |
| 466 | }), |
| 467 | }, |
| 468 | { |
| 469 | Type: "dynamic", |
| 470 | Labels: []string{"set"}, |
| 471 | LabelRanges: []hcl.Range{hcl.Range{}}, |
| 472 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 473 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 474 | "for_each": hcltest.MockExprLiteral(cty.UnknownVal(cty.Map(cty.String))), |
| 475 | }), |
| 476 | Blocks: hcl.Blocks{ |
| 477 | { |
| 478 | Type: "content", |
| 479 | Body: hcltest.MockBody(&hcl.BodyContent{ |
| 480 | Attributes: hcltest.MockAttrs(map[string]hcl.Expression{ |
| 481 | "val": hcltest.MockExprTraversalSrc("each.value"), |
| 482 | }), |
nothing calls this directly
no test coverage detected