Cleanup: modify some sentences about statefulset

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
xin.li 2023-02-01 18:40:02 +08:00
parent bb7c9739a3
commit 6ad156d80e
2 changed files with 5 additions and 5 deletions

View File

@ -598,7 +598,7 @@ var _ = SIGDescribe("StatefulSet", func() {
}) })
framework.ExpectNoError(err) framework.ExpectNoError(err)
// Verify that statuful set will be scaled up in order. // Verify that stateful set will be scaled up in order.
wg := sync.WaitGroup{} wg := sync.WaitGroup{}
var orderErr error var orderErr error
wg.Add(1) wg.Add(1)
@ -652,7 +652,7 @@ var _ = SIGDescribe("StatefulSet", func() {
}) })
framework.ExpectNoError(err) framework.ExpectNoError(err)
// Verify that statuful set will be scaled down in order. // Verify that stateful set will be scaled down in order.
wg.Add(1) wg.Add(1)
go func() { go func() {
defer ginkgo.GinkgoRecover() defer ginkgo.GinkgoRecover()
@ -1664,7 +1664,7 @@ func rollbackTest(ctx context.Context, c clientset.Interface, ns string, ss *app
} }
// confirmStatefulPodCount asserts that the current number of Pods in ss is count, waiting up to timeout for ss to // confirmStatefulPodCount asserts that the current number of Pods in ss is count, waiting up to timeout for ss to
// to scale to count. // scale to count.
func confirmStatefulPodCount(ctx context.Context, c clientset.Interface, count int, ss *appsv1.StatefulSet, timeout time.Duration, hard bool) { func confirmStatefulPodCount(ctx context.Context, c clientset.Interface, count int, ss *appsv1.StatefulSet, timeout time.Duration, hard bool) {
start := time.Now() start := time.Now()
deadline := start.Add(timeout) deadline := start.Add(timeout)
@ -1759,7 +1759,7 @@ func getStatefulSetPodNameAtIndex(index int, ss *appsv1.StatefulSet) string {
type updateStatefulSetFunc func(*appsv1.StatefulSet) type updateStatefulSetFunc func(*appsv1.StatefulSet)
// updateStatefulSetWithRetries updates statfulset template with retries. // updateStatefulSetWithRetries updates statefulset template with retries.
func updateStatefulSetWithRetries(ctx context.Context, c clientset.Interface, namespace, name string, applyUpdate updateStatefulSetFunc) (statefulSet *appsv1.StatefulSet, err error) { func updateStatefulSetWithRetries(ctx context.Context, c clientset.Interface, namespace, name string, applyUpdate updateStatefulSetFunc) (statefulSet *appsv1.StatefulSet, err error) {
statefulSets := c.AppsV1().StatefulSets(namespace) statefulSets := c.AppsV1().StatefulSets(namespace)
var updateErr error var updateErr error

View File

@ -377,7 +377,7 @@ func TestStatefulSetStatusWithPodFail(t *testing.T) {
sts := newSTS("sts", ns.Name, 4) sts := newSTS("sts", ns.Name, 4)
_, err := c.AppsV1().StatefulSets(sts.Namespace).Create(context.TODO(), sts, metav1.CreateOptions{}) _, err := c.AppsV1().StatefulSets(sts.Namespace).Create(context.TODO(), sts, metav1.CreateOptions{})
if err != nil { if err != nil {
t.Fatalf("Could not create statefuleSet %s: %v", sts.Name, err) t.Fatalf("Could not create statefulSet %s: %v", sts.Name, err)
} }
wantReplicas := limitedPodNumber wantReplicas := limitedPodNumber