(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestAttributesAbsoluteAttrError(t *testing.T) { |
| 111 | reg := newTestRegistry(t) |
| 112 | attrs := NewAttributeFactory(containers.DefaultContainer, reg, reg) |
| 113 | vars, err := NewActivation(map[string]any{ |
| 114 | "err": types.NewErr("invalid variable computation"), |
| 115 | }) |
| 116 | if err != nil { |
| 117 | t.Fatalf("NewActivation() failed: %v", err) |
| 118 | } |
| 119 | |
| 120 | // acme.a.b[4][false] |
| 121 | attr := attrs.AbsoluteAttribute(1, "err") |
| 122 | qualMsg := makeQualifier(t, attrs, nil, 2, "message") |
| 123 | attr.AddQualifier(qualMsg) |
| 124 | out, err := attr.Resolve(vars) |
| 125 | if err == nil { |
| 126 | t.Errorf("attr.Resolve('err') got %v, wanted error", out) |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | func TestAttributesRelativeAttr(t *testing.T) { |
| 131 | reg := newTestRegistry(t) |
nothing calls this directly
no test coverage detected