From fbda59186605b1c1a8fc06c6e65a33dcb98e2fbd Mon Sep 17 00:00:00 2001 From: thirdkeyword Date: Mon, 25 Mar 2024 10:34:44 +0800 Subject: [PATCH] fix some typos Signed-off-by: thirdkeyword --- etcdctl/ctlv3/command/check.go | 2 +- scripts/test.sh | 2 +- scripts/test_images.sh | 2 +- scripts/test_lib.sh | 6 +++--- server/storage/backend/hooks_test.go | 4 ++-- server/storage/schema/auth_roles_test.go | 4 ++-- server/storage/schema/auth_users_test.go | 4 ++-- server/storage/schema/confstate.go | 2 +- server/storage/wal/wal.go | 2 +- tests/common/lease_test.go | 4 ++-- tests/integration/lazy_cluster.go | 2 +- tests/robustness/validate/validate_test.go | 2 +- tools/etcd-dump-logs/README.md | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/etcdctl/ctlv3/command/check.go b/etcdctl/ctlv3/command/check.go index 66b9f906d..8d5906449 100644 --- a/etcdctl/ctlv3/command/check.go +++ b/etcdctl/ctlv3/command/check.go @@ -126,7 +126,7 @@ func NewCheckPerfCommand() *cobra.Command { } // TODO: support customized configuration - cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughtput.") + cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughput.") cmd.Flags().StringVar(&checkPerfPrefix, "prefix", "/etcdctl-check-perf/", "The prefix for writing the performance check's keys.") cmd.Flags().BoolVar(&autoCompact, "auto-compact", false, "Compact storage with last revision after test is finished.") cmd.Flags().BoolVar(&autoDefrag, "auto-defrag", false, "Defragment storage after test is finished.") diff --git a/scripts/test.sh b/scripts/test.sh index bfb0229ab..78c80ec0e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -542,7 +542,7 @@ function dep_pass { duplicates=$(echo "${all_dependencies}" | cut -d ',' -f 1,2 | sort | uniq | cut -d ',' -f 1 | sort | uniq -d) || return 2 for dup in ${duplicates}; do - log_error "FAIL: inconsistent versions for depencency: ${dup}" + log_error "FAIL: inconsistent versions for dependency: ${dup}" echo "${all_dependencies}" | grep "${dup}" | sed "s|\\([^,]*\\),\\([^,]*\\),\\([^,]*\\)| - \\1@\\2 from: \\3|g" done if [[ -n "${duplicates}" ]]; then diff --git a/scripts/test_images.sh b/scripts/test_images.sh index 04d5e1e1e..3cdb606b2 100755 --- a/scripts/test_images.sh +++ b/scripts/test_images.sh @@ -81,7 +81,7 @@ if [ "${GET}" != "${VALUE}" ]; then exit 1 fi -echo "Succesfully tested etcd local image ${TAG}" +echo "Successfully tested etcd local image ${TAG}" for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do ARCH_TAG=v"${VERSION}"-"${TARGET_ARCH}" diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index 9ed74a401..550c718d3 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -413,15 +413,15 @@ function run_go_tool { GOARCH="" run "${cmdbin}" "$@" || return 2 } -# assert_no_git_modifications fails if there are any uncommited changes. +# assert_no_git_modifications fails if there are any uncommitted changes. function assert_no_git_modifications { log_callout "Making sure everything is committed." if ! git diff --cached --exit-code; then - log_error "Found staged by uncommited changes. Do commit/stash your changes first." + log_error "Found staged by uncommitted changes. Do commit/stash your changes first." return 2 fi if ! git diff --exit-code; then - log_error "Found unstaged and uncommited changes. Do commit/stash your changes first." + log_error "Found unstaged and uncommitted changes. Do commit/stash your changes first." return 2 fi } diff --git a/server/storage/backend/hooks_test.go b/server/storage/backend/hooks_test.go index 22f8aee3d..0fc73af87 100644 --- a/server/storage/backend/hooks_test.go +++ b/server/storage/backend/hooks_test.go @@ -42,9 +42,9 @@ func TestBackendPreCommitHook(t *testing.T) { // Empty commit. tx.Commit() - assert.Equal(t, ">cc", getCommitsKey(t, be), "expected 2 explict commits") + assert.Equal(t, ">cc", getCommitsKey(t, be), "expected 2 explicit commits") tx.Commit() - assert.Equal(t, ">ccc", getCommitsKey(t, be), "expected 3 explict commits") + assert.Equal(t, ">ccc", getCommitsKey(t, be), "expected 3 explicit commits") } func TestBackendAutoCommitLimitHook(t *testing.T) { diff --git a/server/storage/schema/auth_roles_test.go b/server/storage/schema/auth_roles_test.go index d7323c6f4..7f90663d8 100644 --- a/server/storage/schema/auth_roles_test.go +++ b/server/storage/schema/auth_roles_test.go @@ -79,7 +79,7 @@ func TestGetAllRoles(t *testing.T) { want: []*authpb.Role{{Name: []byte("role2")}}, }, { - name: "Returns data overriden by put", + name: "Returns data overridden by put", setup: func(tx auth.UnsafeAuthWriter) { tx.UnsafePutRole(&authpb.Role{ Name: []byte("role1"), @@ -179,7 +179,7 @@ func TestGetRole(t *testing.T) { want: nil, }, { - name: "Returns data overriden by put", + name: "Returns data overridden by put", setup: func(tx auth.UnsafeAuthWriter) { tx.UnsafePutRole(&authpb.Role{ Name: []byte("role1"), diff --git a/server/storage/schema/auth_users_test.go b/server/storage/schema/auth_users_test.go index 2261e5707..f109697d0 100644 --- a/server/storage/schema/auth_users_test.go +++ b/server/storage/schema/auth_users_test.go @@ -75,7 +75,7 @@ func TestGetAllUsers(t *testing.T) { want: []*authpb.User{{Name: []byte("bob")}}, }, { - name: "Returns data overriden by put", + name: "Returns data overridden by put", setup: func(tx auth.UnsafeAuthWriter) { tx.UnsafePutUser(&authpb.User{ Name: []byte("alice"), @@ -163,7 +163,7 @@ func TestGetUser(t *testing.T) { want: nil, }, { - name: "Returns data overriden by put", + name: "Returns data overridden by put", setup: func(tx auth.UnsafeAuthWriter) { tx.UnsafePutUser(&authpb.User{ Name: []byte("alice"), diff --git a/server/storage/schema/confstate.go b/server/storage/schema/confstate.go index ac3a2cc14..c2bcb5401 100644 --- a/server/storage/schema/confstate.go +++ b/server/storage/schema/confstate.go @@ -36,7 +36,7 @@ func MustUnsafeSaveConfStateToBackend(lg *zap.Logger, tx backend.UnsafeWriter, c } // UnsafeConfStateFromBackend retrieves ConfState from the backend. -// Returns nil if confState in backend is not persisted (e.g. backend writen by state.commit, as they are subject to change. func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) { w.mu.Lock() diff --git a/tests/common/lease_test.go b/tests/common/lease_test.go index 572602805..afb27c330 100644 --- a/tests/common/lease_test.go +++ b/tests/common/lease_test.go @@ -90,8 +90,8 @@ func TestLeaseGrantAndList(t *testing.T) { createdLeases = append(createdLeases, leaseResp.ID) } - // Because we're not guarunteed to talk to the same member, wait for - // listing to eventually return true, either by the result propagaing + // Because we're not guaranteed to talk to the same member, wait for + // listing to eventually return true, either by the result propagating // or by hitting an up to date member. var leases []clientv3.LeaseStatus require.Eventually(t, func() bool { diff --git a/tests/integration/lazy_cluster.go b/tests/integration/lazy_cluster.go index f4b988d66..e27677c71 100644 --- a/tests/integration/lazy_cluster.go +++ b/tests/integration/lazy_cluster.go @@ -31,7 +31,7 @@ import ( // See ./tests/integration/clientv3/examples/main_test.go for canonical usage. // Please notice that the shared (LazyCluster's) state is preserved between // testcases, so left-over state might has cross-testcase effects. -// Prefer dedicated clusters for substancial test-cases. +// Prefer dedicated clusters for substantial test-cases. type LazyCluster interface { // EndpointsHTTP - exposes connection points for http endpoints. diff --git a/tests/robustness/validate/validate_test.go b/tests/robustness/validate/validate_test.go index 429641851..71c471b47 100644 --- a/tests/robustness/validate/validate_test.go +++ b/tests/robustness/validate/validate_test.go @@ -223,7 +223,7 @@ func TestValidateWatch(t *testing.T) { }, }, { - name: "create event and update event in seperate requests both with PrevKV()", + name: "create event and update event in separate requests both with PrevKV()", reports: []report.ClientReport{ { Watch: []model.WatchOperation{ diff --git a/tools/etcd-dump-logs/README.md b/tools/etcd-dump-logs/README.md index d92ba1b5e..0922f2878 100644 --- a/tools/etcd-dump-logs/README.md +++ b/tools/etcd-dump-logs/README.md @@ -97,7 +97,7 @@ Entry types (ConfigChange,IRRCompaction) count is : 5 ``` #### etcd-dump-logs -stream-decoder [data dir] -Decode each entry based on logic in the passed decoder. Decoder status and decoded data are listed in separated tab/columns in the ouput. For parsing purpose, the output from decoder are expected to be in format of "|". Please refer to [decoder_correctoutputformat.sh] as an example. +Decode each entry based on logic in the passed decoder. Decoder status and decoded data are listed in separated tab/columns in the output. For parsing purpose, the output from decoder are expected to be in format of "|". Please refer to [decoder_correctoutputformat.sh] as an example. However, if the decoder output format is not as expected, "decoder_status" will be "decoder output format is not right, print output anyway", and all output from decoder will be considered as "decoded_data"