code spell check (#5230)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com> Signed-off-by: Lyndon-Li <lyonghui@vmware.com>pull/5231/head
parent
a36736e10a
commit
775943c858
|
@ -14,7 +14,7 @@ jobs:
|
|||
uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
# ignore the config/.../crd.go file as it's generated binary data that is edited elswhere.
|
||||
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./go.sum
|
||||
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./go.sum,./LICENSE
|
||||
ignore_words_list: iam,aks,ist,bridget,ue
|
||||
check_filenames: true
|
||||
check_hidden: true
|
||||
|
|
|
@ -429,7 +429,7 @@ Instead, a new method for 'Progress' will be added to interface. Velero server r
|
|||
|
||||
But, this involves good amount of changes and needs a way for backward compatibility.
|
||||
|
||||
As volume plugins are mostly K8s native, its fine to go ahead with current limiation.
|
||||
As volume plugins are mostly K8s native, its fine to go ahead with current limitation.
|
||||
|
||||
### Update Backup CR
|
||||
Instead of creating new CRs, plugins can directly update the status of Backup CR. But, this deviates from current approach of having separate CRs like PodVolumeBackup/PodVolumeRestore to know operations progress.
|
||||
|
|
|
@ -95,7 +95,7 @@ eval $(go run $DIR/chk_version.go)
|
|||
printf "To clarify, you've provided a version string of $VELERO_VERSION.\n"
|
||||
printf "Based on this, the following assumptions have been made: \n"
|
||||
|
||||
# $VELERO_PATCH gets populated by the chk_version.go scrip that parses and verifies the given version format
|
||||
# $VELERO_PATCH gets populated by the chk_version.go script that parses and verifies the given version format
|
||||
# If we've got a patch release, we assume the tag is on release branch.
|
||||
if [[ "$VELERO_PATCH" != 0 ]]; then
|
||||
printf "*\t This is a patch release.\n"
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -89,42 +89,42 @@ type StoreOptionsGetter interface {
|
|||
GetStoreOptions(param interface{}) (map[string]string, error)
|
||||
}
|
||||
|
||||
func NewRepoOptions(options ...func(*RepoOptions) error) (*RepoOptions, error) {
|
||||
ro := &RepoOptions{}
|
||||
for _, o := range options {
|
||||
err := o(ro)
|
||||
func NewRepoOptions(optionFuncs ...func(*RepoOptions) error) (*RepoOptions, error) {
|
||||
options := &RepoOptions{}
|
||||
for _, optionFunc := range optionFuncs {
|
||||
err := optionFunc(options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return ro, nil
|
||||
return options, nil
|
||||
}
|
||||
|
||||
func WithPassword(getter PasswordGetter, param interface{}) func(*RepoOptions) error {
|
||||
return func(ro *RepoOptions) error {
|
||||
return func(options *RepoOptions) error {
|
||||
password, err := getter.GetPassword(param)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ro.RepoPassword = password
|
||||
options.RepoPassword = password
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithConfigFile(workPath string, repoID string) func(*RepoOptions) error {
|
||||
return func(ro *RepoOptions) error {
|
||||
ro.ConfigFilePath = getRepoConfigFile(workPath, repoID)
|
||||
return func(options *RepoOptions) error {
|
||||
options.ConfigFilePath = getRepoConfigFile(workPath, repoID)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithGenOptions(genOptions map[string]string) func(*RepoOptions) error {
|
||||
return func(ro *RepoOptions) error {
|
||||
return func(options *RepoOptions) error {
|
||||
for k, v := range genOptions {
|
||||
ro.GeneralOptions[k] = v
|
||||
options.GeneralOptions[k] = v
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -132,7 +132,7 @@ func WithGenOptions(genOptions map[string]string) func(*RepoOptions) error {
|
|||
}
|
||||
|
||||
func WithStoreOptions(getter StoreOptionsGetter, param interface{}) func(*RepoOptions) error {
|
||||
return func(ro *RepoOptions) error {
|
||||
return func(options *RepoOptions) error {
|
||||
storeType, err := getter.GetStoreType(param)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -143,10 +143,10 @@ func WithStoreOptions(getter StoreOptionsGetter, param interface{}) func(*RepoOp
|
|||
return err
|
||||
}
|
||||
|
||||
ro.StorageType = storeType
|
||||
options.StorageType = storeType
|
||||
|
||||
for k, v := range storeOptions {
|
||||
ro.StorageOptions[k] = v
|
||||
options.StorageOptions[k] = v
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -154,8 +154,8 @@ func WithStoreOptions(getter StoreOptionsGetter, param interface{}) func(*RepoOp
|
|||
}
|
||||
|
||||
func WithDescription(desc string) func(*RepoOptions) error {
|
||||
return func(ro *RepoOptions) error {
|
||||
ro.Description = desc
|
||||
return func(options *RepoOptions) error {
|
||||
options.Description = desc
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ func GetKubeconfigContext() error {
|
|||
func TestE2e(t *testing.T) {
|
||||
// Skip running E2E tests when running only "short" tests because:
|
||||
// 1. E2E tests are long running tests involving installation of Velero and performing backup and restore operations.
|
||||
// 2. E2E tests require a kubernetes cluster to install and run velero which further requires ore configuration. See above referenced command line flags.
|
||||
// 2. E2E tests require a kubernetes cluster to install and run velero which further requires more configuration. See above referenced command line flags.
|
||||
if testing.Short() {
|
||||
t.Skip("Skipping E2E tests")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue