Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Jan 10, 2025
1 parent cf69597 commit a0bfc73
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions apis/apps/v1alpha1/opsrequest_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,24 +503,24 @@ var _ = Describe("OpsRequest webhook", func() {
testSwitchover := func(clusterDef *ClusterDefinition, cluster *Cluster) {
switchoverList := []Switchover{
{
ComponentOps: ComponentOps{ComponentName: "switchover-component-not-exist"},
InstanceName: "*",
ComponentName: "switchover-component-not-exist",
InstanceName: "*",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "",
ComponentName: componentName,
InstanceName: "",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "switchover-instance-name-not-exist",
ComponentName: componentName,
InstanceName: "switchover-instance-name-not-exist",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "*",
ComponentName: componentName,
InstanceName: "*",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: fmt.Sprintf("%s-%s-0", cluster.Name, componentName),
ComponentName: componentName,
InstanceName: fmt.Sprintf("%s-%s-0", cluster.Name, componentName),
},
}

Expand Down Expand Up @@ -590,24 +590,24 @@ var _ = Describe("OpsRequest webhook", func() {
testSwitchoverWithCompDef := func(_ *ClusterDefinition, compDef *ComponentDefinition, cluster *Cluster) {
switchoverList := []Switchover{
{
ComponentOps: ComponentOps{ComponentName: "switchover-component-not-exist"},
InstanceName: "*",
ComponentName: "switchover-component-not-exist",
InstanceName: "*",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "",
ComponentName: componentName,
InstanceName: "",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "switchover-instance-name-not-exist",
ComponentName: componentName,
InstanceName: "switchover-instance-name-not-exist",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: "*",
ComponentName: componentName,
InstanceName: "*",
},
{
ComponentOps: ComponentOps{ComponentName: componentName},
InstanceName: fmt.Sprintf("%s-%s-0", cluster.Name, componentName),
ComponentName: componentName,
InstanceName: fmt.Sprintf("%s-%s-0", cluster.Name, componentName),
},
}

Expand Down

0 comments on commit a0bfc73

Please sign in to comment.