Merge pull request #85846 from akhinos/fix-describe-partition
Fix: describe of statefulset prints pointer not value Kubernetes-commit: dcd0755f84bf8c15fd21e8d697b924991f641ae4
This commit is contained in:
commit
7ee592cfa6
|
@ -3187,7 +3187,7 @@ func describeStatefulSet(ps *appsv1.StatefulSet, selector labels.Selector, event
|
|||
if ps.Spec.UpdateStrategy.RollingUpdate != nil {
|
||||
ru := ps.Spec.UpdateStrategy.RollingUpdate
|
||||
if ru.Partition != nil {
|
||||
w.Write(LEVEL_1, "Partition:\t%d\n", ru.Partition)
|
||||
w.Write(LEVEL_1, "Partition:\t%d\n", *ru.Partition)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3544,7 +3544,7 @@ func TestDescribeNode(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDescribeStatefulSet(t *testing.T) {
|
||||
var partition int32 = 2
|
||||
var partition int32 = 2672
|
||||
var replicas int32 = 1
|
||||
fake := fake.NewSimpleClientset(&appsv1.StatefulSet{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
@ -3575,7 +3575,7 @@ func TestDescribeStatefulSet(t *testing.T) {
|
|||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
expectedOutputs := []string{
|
||||
"bar", "foo", "Containers:", "mytest-image:latest", "Update Strategy", "RollingUpdate", "Partition",
|
||||
"bar", "foo", "Containers:", "mytest-image:latest", "Update Strategy", "RollingUpdate", "Partition", "2672",
|
||||
}
|
||||
for _, o := range expectedOutputs {
|
||||
if !strings.Contains(out, o) {
|
||||
|
|
Loading…
Reference in New Issue