MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / HasBeenUpgraded

Function HasBeenUpgraded

tests/utils/operator/operator.go:294–297  ·  view source on GitHub ↗

HasBeenUpgraded determines if the operator has been upgraded by checking if there is a deletion timestamp. If there isn't, it returns true

(ctx context.Context, crudClient client.Client)

Source from the content-addressed store, hash-verified

292// HasBeenUpgraded determines if the operator has been upgraded by checking
293// if there is a deletion timestamp. If there isn't, it returns true
294func HasBeenUpgraded(ctx context.Context, crudClient client.Client) bool {
295 _, err := GetPodName(ctx, crudClient)
296 return err == nil
297}
298
299// Version returns the current operator version
300func Version(namespace, podName string) (string, error) {

Callers

nothing calls this directly

Calls 1

GetPodNameFunction · 0.85

Tested by

no test coverage detected