Skip to content

Commit

Permalink
fix typo of invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Oct 10, 2023
1 parent 77f9218 commit b89f6db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cluster/calcium/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestSetWorkloadsStatus(t *testing.T) {
// failed by workload name
workload := &types.Workload{
ID: "123",
Name: "invaild",
Name: "invalid",
}
store.On("GetWorkload", mock.Anything, mock.Anything).Return(workload, nil).Once()
_, err = c.SetWorkloadsStatus(ctx, []*types.StatusMeta{{ID: "123"}}, nil)
Expand Down
2 changes: 1 addition & 1 deletion store/etcdv3/meta/etcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func TestETCD(t *testing.T) {

// GetMulti error
_, err = m.GetMulti(context.Background(), []string{"a", "b"})
require.EqualError(t, err, "key: a: bad `Count` value, entity count invaild")
require.EqualError(t, err, "key: a: bad `Count` value, entity count invalid")

// GetMulti success
m.Put(context.Background(), "a", "b")
Expand Down
2 changes: 1 addition & 1 deletion strategy/strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func deployedNodes() []Info {
func TestDeploy(t *testing.T) {
ctx := context.Background()

// invaild strategy
// invalid strategy
_, err := Deploy(ctx, "invalid", -1, 3, nil, 2)
assert.Error(t, err)

Expand Down
32 changes: 16 additions & 16 deletions types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ var (
ErrNodeExists = errors.New("node already exists")

// Node
ErrInvaildNodeEndpoint = errors.New("invaild node endpoint")
ErrInvaildNodeEndpoint = errors.New("invalid node endpoint")
ErrNodeNotEmpty = errors.New("node not empty, still has workloads associated")
ErrNodeNotExists = errors.New("node not exists")
ErrInvaildNodeStatusTTL = errors.New("invaild TTL for node status, should be > 0")
ErrInvaildNodeStatusTTL = errors.New("invalid TTL for node status, should be > 0")

// Lock
ErrLockKeyInvaild = errors.New("lock key is invaild")
ErrLockKeyInvaild = errors.New("lock key is invalid")
ErrLockSessionDone = errors.New("lock session done")

// Client
Expand All @@ -33,26 +33,26 @@ var (

// General
ErrInvaildIPAddress = errors.New("invalid IP address")
ErrInvaildIPWithPort = errors.New("invaild IP with port")
ErrInvaildIPWithPort = errors.New("invalid IP with port")
ErrICMPLost = errors.New("icmp packets lost")
ErrAllConnectionsFailed = errors.New("all connections failed")
ErrUnexpectedRedirect = errors.New("unexpected redirect")

// Engine
ErrInvaildMemory = errors.New("invaild `Memory` value setting")
ErrInvaildMemory = errors.New("invalid `Memory` value setting")
ErrNilEngine = errors.New("engine is nil")
ErrInvaildRefs = errors.New("invalid image refs")
ErrNoImage = errors.New("no image")
ErrNoImageUser = errors.New("no image user")
ErrInvaildRemoteDigest = errors.New("got invaild digest")
ErrInvaildRemoteDigest = errors.New("got invalid digest")
ErrInvaildEngineEndpoint = errors.New("not Support endpoint")
ErrEngineNotImplemented = errors.New("not implemented")
ErrInvalidEngineArgs = errors.New("invalid engine args")

// Workload
ErrInvaildWorkloadStatus = errors.New("status has no appname / entrypoint / nodename")
ErrInvaildWorkloadMeta = errors.New("invaild workload meta")
ErrInvaildWorkloadOps = errors.New("invaild workload ops")
ErrInvaildWorkloadMeta = errors.New("invalid workload meta")
ErrInvaildWorkloadOps = errors.New("invalid workload ops")
ErrInvalidWorkloadName = errors.New("invalid workload name")
ErrWorkloadIgnored = errors.New("ignore this workload")
ErrWorkloadNotExists = errors.New("workload not exists")
Expand All @@ -63,9 +63,9 @@ var (
ErrPodNotFound = errors.New("pod not found")

// GRPC
ErrInvaildGRPCRequestMeta = errors.New("invaild grpc request meta")
ErrInvaildGRPCPassword = errors.New("invaild grpc password")
ErrInvaildGRPCUsername = errors.New("invaild grpc username")
ErrInvaildGRPCRequestMeta = errors.New("invalid grpc request meta")
ErrInvaildGRPCPassword = errors.New("invalid grpc password")
ErrInvaildGRPCUsername = errors.New("invalid grpc username")

// Opts Validation
ErrNoBuildPod = errors.New("no build pod set in config")
Expand Down Expand Up @@ -95,16 +95,16 @@ var (
ErrKeyExists = errors.New("key exists")
ErrNoOps = errors.New("no txn ops")
ErrTxnConditionFailed = errors.New("ETCD Txn condition failed")
ErrInvaildCount = errors.New("bad `Count` value, entity count invaild") // store key-value count not same
ErrInvaildCount = errors.New("bad `Count` value, entity count invalid") // store key-value count not same

// WAL
ErrInvaildWALEventType = errors.New("invaild WAL event type")
ErrInvaildWALEvent = errors.New("invaild WAL event type")
ErrInvaildWALEventType = errors.New("invalid WAL event type")
ErrInvaildWALEvent = errors.New("invalid WAL event type")
ErrInvalidWALBucket = errors.New("invalid WAL bucket")
ErrInvalidWALDataType = errors.New("invalid WAL data type")

// Create
ErrInvaildDeployCount = errors.New("invaild deploy count")
ErrInvaildDeployCount = errors.New("invalid deploy count")
ErrRollbackMapIsNotEmpty = errors.New("rollback map is not empty")
ErrGetMostIdleNodeFailed = errors.New("get most idle node failed")

Expand All @@ -116,7 +116,7 @@ var (
ErrNoFilesToCopy = errors.New("no files to copy")

// Core
ErrInvaildCoreEndpointType = errors.New("invaild Core endpoint type")
ErrInvaildCoreEndpointType = errors.New("invalid Core endpoint type")

// Test
ErrMockError = errors.New("mock error")
Expand Down

0 comments on commit b89f6db

Please sign in to comment.