MCPcopy Create free account
hub / github.com/cel-expr/cel-go / TestContainers_Extend_Alias

Function TestContainers_Extend_Alias

common/containers/container_test.go:201–219  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

199}
200
201func TestContainers_Extend_Alias(t *testing.T) {
202 c, err := DefaultContainer.Extend(Alias("test.alias", "alias"))
203 if err != nil {
204 t.Fatal(err)
205 }
206 if c.AliasSet()["alias"] != "test.alias" {
207 t.Errorf("got alias %v wanted 'test.alias'", c.AliasSet())
208 }
209 c, err = c.Extend(Name("with.container"))
210 if err != nil {
211 t.Fatal(err)
212 }
213 if c.Name() != "with.container" {
214 t.Errorf("got container name %s, wanted 'with.container'", c.Name())
215 }
216 if c.AliasSet()["alias"] != "test.alias" {
217 t.Errorf("got alias %v wanted 'test.alias'", c.AliasSet())
218 }
219}
220
221func TestContainers_Extend_Name(t *testing.T) {
222 c, err := DefaultContainer.Extend(Name(""))

Callers

nothing calls this directly

Calls 5

AliasFunction · 0.85
NameFunction · 0.85
AliasSetMethod · 0.80
NameMethod · 0.65
ExtendMethod · 0.45

Tested by

no test coverage detected