MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / TestClusterInstanceSet

Function TestClusterInstanceSet

internal/naming/selectors_test.go:83–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestClusterInstanceSet(t *testing.T) {
84 s, err := AsSelector(ClusterInstanceSet("something", "also"))
85 assert.NilError(t, err)
86 assert.DeepEqual(t, s.String(), strings.Join([]string{
87 "postgres-operator.crunchydata.com/cluster=something",
88 "postgres-operator.crunchydata.com/instance-set=also",
89 }, ","))
90
91 _, err = AsSelector(ClusterInstanceSet("--whoa/yikes", "ok"))
92 assert.ErrorContains(t, err, "Invalid")
93}
94
95func TestClusterInstanceSets(t *testing.T) {
96 s, err := AsSelector(ClusterInstanceSets("something"))

Callers

nothing calls this directly

Calls 3

AsSelectorFunction · 0.85
ClusterInstanceSetFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected