change unit test name
This commit is contained in:
parent
2e2ac12086
commit
181d87f9b2
|
|
@ -1074,27 +1074,10 @@ func newService(ann map[string]string, svcT v1.ServiceType, lbSr []string) *v1.S
|
||||||
return svc
|
return svc
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSameService(t *testing.T) {
|
func TestCompareServices(t *testing.T) {
|
||||||
testName := "test comparing services"
|
testName := "TestCompareServices"
|
||||||
client, _ := newFakeK8sServiceClient()
|
cluster := Cluster{
|
||||||
namespace := "default"
|
Config: Config{
|
||||||
|
|
||||||
pg := acidv1.Postgresql{
|
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
|
||||||
Name: "acid-fake-cluster",
|
|
||||||
Namespace: namespace,
|
|
||||||
Annotations: map[string]string{
|
|
||||||
"deployment-time": "2022-02-02 12:00:00",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Spec: acidv1.PostgresSpec{
|
|
||||||
Volume: acidv1.Volume{
|
|
||||||
Size: "1Gi",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
var cluster = New(
|
|
||||||
Config{
|
|
||||||
OpConfig: config.Config{
|
OpConfig: config.Config{
|
||||||
Resources: config.Resources{
|
Resources: config.Resources{
|
||||||
IgnoredAnnotations: []string{
|
IgnoredAnnotations: []string{
|
||||||
|
|
@ -1102,7 +1085,8 @@ func TestSameService(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, client, pg, logger, eventRecorder)
|
},
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
about string
|
about string
|
||||||
|
|
@ -1386,6 +1370,7 @@ func TestSameService(t *testing.T) {
|
||||||
match: true,
|
match: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.about, func(t *testing.T) {
|
t.Run(tt.about, func(t *testing.T) {
|
||||||
match, reason := cluster.compareServices(tt.current, tt.new)
|
match, reason := cluster.compareServices(tt.current, tt.new)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue