Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: describe of statefulset prints pointer not value #85846

Merged
merged 1 commit into from Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -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)
}
}

Expand Down
Expand Up @@ -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{
Expand Down Expand Up @@ -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) {
Expand Down