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

Function TestCluster

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

Source from the content-addressed store, hash-verified

22}
23
24func TestCluster(t *testing.T) {
25 s, err := AsSelector(Cluster("something"))
26 assert.NilError(t, err)
27 assert.DeepEqual(t, s.String(), strings.Join([]string{
28 "postgres-operator.crunchydata.com/cluster=something",
29 }, ","))
30
31 _, err = AsSelector(Cluster("--whoa/yikes"))
32 assert.ErrorContains(t, err, "Invalid")
33}
34
35func TestClusterBackupJobs(t *testing.T) {
36 s, err := AsSelector(ClusterBackupJobs("something"))

Callers

nothing calls this directly

Calls 3

AsSelectorFunction · 0.85
ClusterFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected