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

Function TestClusterInstanceSets

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

Source from the content-addressed store, hash-verified

93}
94
95func TestClusterInstanceSets(t *testing.T) {
96 s, err := AsSelector(ClusterInstanceSets("something"))
97 assert.NilError(t, err)
98 assert.DeepEqual(t, s.String(), strings.Join([]string{
99 "postgres-operator.crunchydata.com/cluster=something",
100 "postgres-operator.crunchydata.com/instance-set",
101 }, ","))
102
103 _, err = AsSelector(ClusterInstanceSets("--whoa/yikes"))
104 assert.ErrorContains(t, err, "Invalid")
105}
106
107func TestClusterPatronis(t *testing.T) {
108 cluster := &v1beta1.PostgresCluster{}

Callers

nothing calls this directly

Calls 3

AsSelectorFunction · 0.85
ClusterInstanceSetsFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected