mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 18:33:02 +02:00
* deprecate ClusterName field of Postgresql type * remove for teamId from operator API endpints /status /logs /history * update dns_format_string and yaml template in UI
31 lines
868 B
Go
31 lines
868 B
Go
package apiserver
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
const (
|
|
clusterStatusTest = "/clusters/test-namespace/testcluster/"
|
|
clusterStatusNumericTest = "/clusters/test-namespace-1/testcluster/"
|
|
clusterLogsTest = "/clusters/test-namespace/testcluster/logs/"
|
|
teamTest = "/clusters/test-id/"
|
|
)
|
|
|
|
func TestUrlRegexps(t *testing.T) {
|
|
if clusterStatusURL.FindStringSubmatch(clusterStatusTest) == nil {
|
|
t.Errorf("clusterStatusURL can't match %s", clusterStatusTest)
|
|
}
|
|
|
|
if clusterStatusURL.FindStringSubmatch(clusterStatusNumericTest) == nil {
|
|
t.Errorf("clusterStatusURL can't match %s", clusterStatusNumericTest)
|
|
}
|
|
|
|
if clusterLogsURL.FindStringSubmatch(clusterLogsTest) == nil {
|
|
t.Errorf("clusterLogsURL can't match %s", clusterLogsTest)
|
|
}
|
|
|
|
if teamURL.FindStringSubmatch(teamTest) == nil {
|
|
t.Errorf("teamURL can't match %s", teamTest)
|
|
}
|
|
}
|