1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-22 17:02:03 +01:00

starlark/types: Provider.Type

Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
This commit is contained in:
Máximo Cuadros 2019-07-23 23:22:20 +02:00
parent d25c7b32a2
commit c8eb85ef8f
2 changed files with 2 additions and 1 deletions

@ -84,7 +84,7 @@ func (p *Provider) String() string {
// Type honors the starlark.Value interface. It shadows p.Resource.Type.
func (p *Provider) Type() string {
return "provider"
return fmt.Sprintf("Provider<%s>", p.name)
}
// Attr honors the starlark.HasAttrs interface.

@ -8,6 +8,7 @@ assert.eq(len(dir(p.resource)), 506)
resources = dir(p.resource)
assert.contains(resources, "instance")
assert.eq(type(p), "Provider<aws>")
assert.eq(type(p.resource.instance), "ResourceCollection<resource.aws_instance>")
assert.eq(type(p.resource.instance()), "Resource<resource.aws_instance>")