From 05c493b3a6de9f95f7e11eb35148e1639cf601b4 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Mon, 19 Oct 2020 21:21:06 -0400 Subject: [PATCH] Spelling (#4596) --- common/common.go | 2 +- controller/appcontroller.go | 2 +- controller/clusterinfoupdater_test.go | 4 +-- controller/state.go | 4 +-- docs/operator-manual/secret-management.md | 2 +- docs/operator-manual/upgrading/1.6-1.7.md | 2 +- .../user-management/openunison.md | 6 ++-- docs/user-guide/jsonnet.md | 2 +- pkg/apis/application/v1alpha1/types.go | 2 +- pkg/apis/application/v1alpha1/types_test.go | 2 +- reposerver/repository/repository_test.go | 4 +-- server/application/application_test.go | 4 +-- test/e2e/app_management_test.go | 2 +- test/e2e/fixture/fixture.go | 2 +- test/e2e/project_management_test.go | 2 +- util/argo/argo_test.go | 4 +-- util/dex/dex_test.go | 6 ++-- util/rbac/rbac_test.go | 36 +++++++++---------- util/settings/settings.go | 2 +- util/settings/settings_test.go | 2 +- 20 files changed, 46 insertions(+), 46 deletions(-) diff --git a/common/common.go b/common/common.go index 82a480120ff4f..79586d936fc82 100644 --- a/common/common.go +++ b/common/common.go @@ -127,7 +127,7 @@ const ( // AnnotationKeyLinkPrefix tells the UI to add an external link icon to the application node // that links to the value given in the annotation. // The annotation key must be followed by a unique identifier. Ex: link.argocd.argoproj.io/dashboard - // It's valid to have multiple annotions that match the prefix. + // It's valid to have multiple annotations that match the prefix. // Values can simply be a url or they can have // an optional link title separated by a "|" // Ex: "http://grafana.example.com/d/yu5UH4MMz/deployments" diff --git a/controller/appcontroller.go b/controller/appcontroller.go index 87c797b1fdf85..9f4d3e639f311 100644 --- a/controller/appcontroller.go +++ b/controller/appcontroller.go @@ -1332,7 +1332,7 @@ func (ctrl *ApplicationController) autoSync(app *appv1.Application, syncStatus * } } if bAllNeedPrune { - message := fmt.Sprintf("Skipping sync attempt to %s: auto-sync will wipe out all resourses", desiredCommitSHA) + message := fmt.Sprintf("Skipping sync attempt to %s: auto-sync will wipe out all resources", desiredCommitSHA) logCtx.Warnf(message) return &appv1.ApplicationCondition{Type: appv1.ApplicationConditionSyncError, Message: message} } diff --git a/controller/clusterinfoupdater_test.go b/controller/clusterinfoupdater_test.go index c2e1eb2c58755..c22da7be07972 100644 --- a/controller/clusterinfoupdater_test.go +++ b/controller/clusterinfoupdater_test.go @@ -39,7 +39,7 @@ func TestClusterSecretUpdater(t *testing.T) { kubeclientset := fake.NewSimpleClientset() appclientset := appsfake.NewSimpleClientset() - appInfomer := appinformers.NewApplicationInformer(appclientset, "", time.Minute, cache.Indexers{}) + appInformer := appinformers.NewApplicationInformer(appclientset, "", time.Minute, cache.Indexers{}) settingsManager := settings.NewSettingsManager(context.Background(), kubeclientset, fakeNamespace) argoDB := db.NewDB(fakeNamespace, settingsManager, kubeclientset) ctx, cancel := context.WithCancel(context.Background()) @@ -57,7 +57,7 @@ func TestClusterSecretUpdater(t *testing.T) { SyncError: test.SyncError, } - lister := applisters.NewApplicationLister(appInfomer.GetIndexer()).Applications(fakeNamespace) + lister := applisters.NewApplicationLister(appInformer.GetIndexer()).Applications(fakeNamespace) updater := NewClusterInfoUpdater(nil, argoDB, lister, appCache, nil) err = updater.updateClusterInfo(*cluster, info) diff --git a/controller/state.go b/controller/state.go index 7c1268da64cfa..cff645f0ca4c5 100644 --- a/controller/state.go +++ b/controller/state.go @@ -266,7 +266,7 @@ func (m *appStateManager) getComparisonSettings(app *appv1.Application) (string, func verifyGnuPGSignature(revision string, project *appv1.AppProject, manifestInfo *apiclient.ManifestResponse) []appv1.ApplicationCondition { now := metav1.Now() conditions := make([]appv1.ApplicationCondition, 0) - // We need to have some data in the verificatin result to parse, otherwise there was no signature + // We need to have some data in the verification result to parse, otherwise there was no signature if manifestInfo.VerifyResult != "" { verifyResult, err := gpg.ParseGitCommitVerification(manifestInfo.VerifyResult) if err != nil { @@ -538,7 +538,7 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *ap } // Git has already performed the signature verification via its GPG interface, and the result is available - // in the manifest info received from the repository server. We now need to form our oppinion about the result + // in the manifest info received from the repository server. We now need to form our opinion about the result // and stop processing if we do not agree about the outcome. if gpg.IsGPGEnabled() && verifySignature && manifestInfo != nil { conditions = append(conditions, verifyGnuPGSignature(revision, project, manifestInfo)...) diff --git a/docs/operator-manual/secret-management.md b/docs/operator-manual/secret-management.md index a51c8fbd35385..42e608c601f02 100644 --- a/docs/operator-manual/secret-management.md +++ b/docs/operator-manual/secret-management.md @@ -3,7 +3,7 @@ Argo CD is un-opinionated about how secrets are managed. There's many ways to do it and there's no one-size-fits-all solution. Here's some ways people are doing GitOps secrets: * [Bitnami Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) -* [Godaddy Kubernetes External Secrets](https://github.com/godaddy/kubernetes-external-secrets) +* [GoDaddy Kubernetes External Secrets](https://github.com/godaddy/kubernetes-external-secrets) * [External Secrets Operator](https://github.com/ContainerSolutions/externalsecret-operator) * [Hashicorp Vault](https://www.vaultproject.io) * [Banzai Cloud Bank-Vaults](https://github.com/banzaicloud/bank-vaults) diff --git a/docs/operator-manual/upgrading/1.6-1.7.md b/docs/operator-manual/upgrading/1.6-1.7.md index c3aaf750cfe09..709ec82dc3279 100644 --- a/docs/operator-manual/upgrading/1.6-1.7.md +++ b/docs/operator-manual/upgrading/1.6-1.7.md @@ -13,7 +13,7 @@ rollback to previous version - no data loss is expected. As part of v1.7 release, the Kubernetes client library have been upgrade to v1.18.8 as well as we've started using https://github.com/kubernetes-sigs/yaml for YAML handling to be consistent with `kubectl` behavior. This introduced a change of multiline string handling in resource manifests. As a result, YAML manifests with multiline -strings might become out-of-sync after upgrading and you might have to trigger the syncronization once to resolve it. +strings might become out-of-sync after upgrading and you might have to trigger the synchronization once to resolve it. Affected resource example: diff --git a/docs/operator-manual/user-management/openunison.md b/docs/operator-manual/user-management/openunison.md index fba59e02b1e42..469d85f14935b 100644 --- a/docs/operator-manual/user-management/openunison.md +++ b/docs/operator-manual/user-management/openunison.md @@ -57,7 +57,7 @@ If everything went correctly, login to your OpenUnison instance and there should ## Configure ArgoCD Policy -OpenUnison places groups in the `groups` claim. These claims will show up when you click on the user-info section of the ArgoCD portal. If you're using LDAP, Active Directory, or Active Directory Federation Services the groups will provided to ArgoCD as full Distinguished Names (DN). Since a DN containers commas (`,`) you'll need to quote the group name in your policy. For instance to assign `CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com` as an adminsistrator would look like: +OpenUnison places groups in the `groups` claim. These claims will show up when you click on the user-info section of the ArgoCD portal. If you're using LDAP, Active Directory, or Active Directory Federation Services the groups will provided to ArgoCD as full Distinguished Names (DN). Since a DN containers commas (`,`) you'll need to quote the group name in your policy. For instance to assign `CN=k8s_login_cluster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com` as an administrator would look like: ``` apiVersion: v1 @@ -67,5 +67,5 @@ metadata: namespace: argocd data: policy.csv: | - g, "CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com", role:admin -``` \ No newline at end of file + g, "CN=k8s_login_cluster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com", role:admin +``` diff --git a/docs/user-guide/jsonnet.md b/docs/user-guide/jsonnet.md index 973510f616891..17627e18c280f 100644 --- a/docs/user-guide/jsonnet.md +++ b/docs/user-guide/jsonnet.md @@ -7,7 +7,7 @@ Any file matching `*.jsonnet` in a directory app is treated as a Jsonnet file. A > v1.4 Jsonnet apps have access to the [standard build environment](build-environment.md) via substitution into *TLAs* and *external variables*. -It is also possible to add a shared libary (e.g. `vendor` folder) relative to the reposity root. +It is also possible to add a shared library (e.g. `vendor` folder) relative to the repository root. E.g. via the CLI: diff --git a/pkg/apis/application/v1alpha1/types.go b/pkg/apis/application/v1alpha1/types.go index 2172d12f265ad..6de19544170e9 100644 --- a/pkg/apis/application/v1alpha1/types.go +++ b/pkg/apis/application/v1alpha1/types.go @@ -2082,7 +2082,7 @@ func (w SyncWindow) Active() bool { func (w SyncWindow) active(currentTime time.Time) bool { // If SyncWindow.Active() is called outside of a UTC locale, it should be - // first converted to UTC before searc + // first converted to UTC before search currentTime = currentTime.UTC() specParser := cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow) diff --git a/pkg/apis/application/v1alpha1/types_test.go b/pkg/apis/application/v1alpha1/types_test.go index f332d1a4ff321..ff976ce0705d0 100644 --- a/pkg/apis/application/v1alpha1/types_test.go +++ b/pkg/apis/application/v1alpha1/types_test.go @@ -1024,7 +1024,7 @@ func TestEnv_Environ(t *testing.T) { } func TestKustomizeImage_Match(t *testing.T) { - // no pefix + // no prefix assert.False(t, KustomizeImage("foo=1").Match("bar=1")) // mismatched delimiter assert.False(t, KustomizeImage("foo=1").Match("bar:1")) diff --git a/reposerver/repository/repository_test.go b/reposerver/repository/repository_test.go index b5e11ea354683..8a44e5e62ebd1 100644 --- a/reposerver/repository/repository_test.go +++ b/reposerver/repository/repository_test.go @@ -240,7 +240,7 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) { // The same pattern PauseGenerationAfterFailedGenerationAttempts generation attempts, followed by // PauseGenerationOnFailureForRequests cached responses, should apply for various combinations of - // both paramters. + // both parameters. tests := []struct { PauseGenerationAfterFailedGenerationAttempts int @@ -317,7 +317,7 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) { // nolint:staticcheck assert.True(t, cachedManifestResponse.FirstFailureTimestamp != 0) - // Internal cache values should update correctly based on number of return cache entries, concecutive failures should stay the same + // Internal cache values should update correctly based on number of return cache entries, consecutive failures should stay the same assert.True(t, cachedManifestResponse.NumberOfConsecutiveFailures == service.initConstants.PauseGenerationAfterFailedGenerationAttempts) assert.True(t, cachedManifestResponse.NumberOfCachedResponsesReturned == (adjustedInvocation-service.initConstants.PauseGenerationAfterFailedGenerationAttempts+1)) } diff --git a/server/application/application_test.go b/server/application/application_test.go index a9f5b2dbcebd0..b18bb7a3a0567 100644 --- a/server/application/application_test.go +++ b/server/application/application_test.go @@ -152,13 +152,13 @@ func newTestAppServer(objects ...runtime.Object) *Server { //ctx, cancel := context.WithCancel(context.Background()) go appInformer.Run(ctx.Done()) if !k8scache.WaitForCacheSync(ctx.Done(), appInformer.HasSynced) { - panic("Timed out waiting forfff caches to sync") + panic("Timed out waiting for caches to sync") } projInformer := factory.Argoproj().V1alpha1().AppProjects().Informer() go projInformer.Run(ctx.Done()) if !k8scache.WaitForCacheSync(ctx.Done(), projInformer.HasSynced) { - panic("Timed out waiting forfff caches to sync") + panic("Timed out waiting for caches to sync") } server := NewServer( diff --git a/test/e2e/app_management_test.go b/test/e2e/app_management_test.go index 4672e52b111fa..278e66b256806 100644 --- a/test/e2e/app_management_test.go +++ b/test/e2e/app_management_test.go @@ -1185,7 +1185,7 @@ func TestSyncWithInfos(t *testing.T) { //Given: argocd app create does not provide --dest-namespace // Manifest contains resource console which does not require namespace //Expect: no app.Status.Conditions -func TestCreateAppWithNoNameSpaceForGlobalResourse(t *testing.T) { +func TestCreateAppWithNoNameSpaceForGlobalResource(t *testing.T) { Given(t). Path(globalWithNoNameSpace). When(). diff --git a/test/e2e/fixture/fixture.go b/test/e2e/fixture/fixture.go index 4399e649922ec..f9e75e9e62b4e 100644 --- a/test/e2e/fixture/fixture.go +++ b/test/e2e/fixture/fixture.go @@ -320,7 +320,7 @@ func EnsureCleanState(t *testing.T) { ClusterResourceWhitelist: []v1.GroupKind{{Group: "*", Kind: "*"}}, }) - // Create seperate project for testing gpg signature verification + // Create separate project for testing gpg signature verification FailOnErr(RunCli("proj", "create", "gpg")) SetProjectSpec("gpg", v1alpha1.AppProjectSpec{ OrphanedResources: nil, diff --git a/test/e2e/project_management_test.go b/test/e2e/project_management_test.go index 00272f483bdf9..799790295b73b 100644 --- a/test/e2e/project_management_test.go +++ b/test/e2e/project_management_test.go @@ -491,7 +491,7 @@ func TestGetVirtualProjectNoMatch(t *testing.T) { err := createAndConfigGlobalProject() assert.NoError(t, err) - //Create project which does not matche global project settings + //Create project which does not match global project settings projectName := "proj-" + fixture.Name() _, err = fixture.RunCli("proj", "create", projectName, "--description", "Test description", diff --git a/util/argo/argo_test.go b/util/argo/argo_test.go index 62d4f10585250..289c074b220bc 100644 --- a/util/argo/argo_test.go +++ b/util/argo/argo_test.go @@ -618,10 +618,10 @@ func TestValidateDestination(t *testing.T) { } db := &dbmocks.ArgoDB{} - db.On("ListClusters", context.Background()).Return(nil, fmt.Errorf("an error occured")) + db.On("ListClusters", context.Background()).Return(nil, fmt.Errorf("an error occurred")) err := ValidateDestination(context.Background(), &dest, db) - assert.Equal(t, "unable to find destination server: an error occured", err.Error()) + assert.Equal(t, "unable to find destination server: an error occurred", err.Error()) assert.False(t, dest.IsServerInferred()) }) diff --git a/util/dex/dex_test.go b/util/dex/dex_test.go index 7cbecaef5d958..288d73d527cb1 100644 --- a/util/dex/dex_test.go +++ b/util/dex/dex_test.go @@ -209,9 +209,9 @@ func Test_GenerateDexConfig(t *testing.T) { assert.True(t, ok) assert.Equal(t, 3, len(clients)) - customCient := clients[2].(map[string]interface{}) - assert.Equal(t, "argo-workflow", customCient["id"].(string)) - assert.Equal(t, 1, len(customCient["redirectURIs"].([]interface{}))) + customClient := clients[2].(map[string]interface{}) + assert.Equal(t, "argo-workflow", customClient["id"].(string)) + assert.Equal(t, 1, len(customClient["redirectURIs"].([]interface{}))) }) } diff --git a/util/rbac/rbac_test.go b/util/rbac/rbac_test.go index b92b5763aaa71..2d21f97dd9bee 100644 --- a/util/rbac/rbac_test.go +++ b/util/rbac/rbac_test.go @@ -17,8 +17,8 @@ import ( ) const ( - fakeConfgMapName = "fake-cm" - fakeNamespace = "fake-ns" + fakeConfigMapName = "fake-cm" + fakeNamespace = "fake-ns" ) var ( @@ -34,7 +34,7 @@ func fakeConfigMap() *apiv1.ConfigMap { APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ - Name: fakeConfgMapName, + Name: fakeConfigMapName, Namespace: fakeNamespace, }, Data: make(map[string]string), @@ -45,7 +45,7 @@ func fakeConfigMap() *apiv1.ConfigMap { // TestBuiltinPolicyEnforcer tests the builtin policy rules func TestBuiltinPolicyEnforcer(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) @@ -84,7 +84,7 @@ func TestPolicyInformer(t *testing.T) { cm := fakeConfigMap() cm.Data[ConfigMapPolicyCSVKey] = "p, admin, applications, delete, */*, allow" kubeclientset := fake.NewSimpleClientset(cm) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) ctx := context.Background() ctx, cancel := context.WithCancel(ctx) @@ -113,7 +113,7 @@ func TestPolicyInformer(t *testing.T) { // TestResourceActionWildcards verifies the ability to use wildcards in resources and actions func TestResourceActionWildcards(t *testing.T) { kubeclientset := fake.NewSimpleClientset(fakeConfigMap()) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) policy := ` p, alice, *, get, foo/obj, allow p, bob, repositories, *, foo/obj, allow @@ -185,7 +185,7 @@ p, danny, applications, get, proj1/a*p1, allow // TestProjectIsolationEnforcement verifies the ability to create Project specific policies func TestProjectIsolationEnforcement(t *testing.T) { kubeclientset := fake.NewSimpleClientset(fakeConfigMap()) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) policy := ` p, role:foo-admin, *, *, foo/*, allow p, role:bar-admin, *, *, bar/*, allow @@ -205,7 +205,7 @@ g, bob, role:bar-admin // TestProjectReadOnly verifies the ability to have a read only role in a Project func TestProjectReadOnly(t *testing.T) { kubeclientset := fake.NewSimpleClientset(fakeConfigMap()) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) policy := ` p, role:foo-readonly, *, get, foo/*, allow g, alice, role:foo-readonly @@ -221,7 +221,7 @@ g, alice, role:foo-readonly // TestDefaultRole tests the ability to set a default role func TestDefaultRole(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) _ = enf.SetBuiltinPolicy(assets.BuiltinPolicyCSV) @@ -235,7 +235,7 @@ func TestDefaultRole(t *testing.T) { // TestURLAsObjectName tests the ability to have a URL as an object name func TestURLAsObjectName(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) policy := ` @@ -255,7 +255,7 @@ p, cathy, repositories, *, foo/*, allow func TestEnableDisableEnforce(t *testing.T) { kubeclientset := fake.NewSimpleClientset(fakeConfigMap()) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) policy := ` p, alice, *, get, foo/obj, allow p, mike, *, get, foo/obj, deny @@ -283,7 +283,7 @@ p, mike, *, get, foo/obj, deny func TestUpdatePolicy(t *testing.T) { kubeclientset := fake.NewSimpleClientset(fakeConfigMap()) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) _ = enf.SetUserPolicy("p, alice, *, get, foo/obj, allow") assert.True(t, enf.Enforce("alice", "applications", "get", "foo/obj")) @@ -313,14 +313,14 @@ func TestUpdatePolicy(t *testing.T) { func TestNoPolicy(t *testing.T) { cm := fakeConfigMap() kubeclientset := fake.NewSimpleClientset(cm) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) assert.False(t, enf.Enforce("admin", "applications", "delete", "foo/bar")) } // TestClaimsEnforcerFunc tests func TestClaimsEnforcerFunc(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) claims := jwt.StandardClaims{ Subject: "foo", } @@ -335,7 +335,7 @@ func TestClaimsEnforcerFunc(t *testing.T) { // enforcing a runtime policy func TestDefaultRoleWithRuntimePolicy(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) runtimePolicy := assets.BuiltinPolicyCSV @@ -348,7 +348,7 @@ func TestDefaultRoleWithRuntimePolicy(t *testing.T) { // take effect when enforcing a runtime policy func TestClaimsEnforcerFuncWithRuntimePolicy(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) runtimePolicy := assets.BuiltinPolicyCSV @@ -366,7 +366,7 @@ func TestClaimsEnforcerFuncWithRuntimePolicy(t *testing.T) { func TestInvalidRuntimePolicy(t *testing.T) { cm := fakeConfigMap() kubeclientset := fake.NewSimpleClientset(cm) - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) _ = enf.SetBuiltinPolicy(assets.BuiltinPolicyCSV) @@ -400,7 +400,7 @@ func TestValidatePolicy(t *testing.T) { // TestEnforceErrorMessage ensures we give descriptive error message func TestEnforceErrorMessage(t *testing.T) { kubeclientset := fake.NewSimpleClientset() - enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil) + enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil) err := enf.syncUpdate(fakeConfigMap(), noOpUpdate) assert.Nil(t, err) diff --git a/util/settings/settings.go b/util/settings/settings.go index 4da643e3abecd..45772728aa7c0 100644 --- a/util/settings/settings.go +++ b/util/settings/settings.go @@ -833,7 +833,7 @@ func validateExternalURL(u string) error { return fmt.Errorf("Failed to parse URL: %v", err) } if URL.Scheme != "http" && URL.Scheme != "https" { - return fmt.Errorf("URL must inlcude http or https protocol") + return fmt.Errorf("URL must include http or https protocol") } return nil } diff --git a/util/settings/settings_test.go b/util/settings/settings_test.go index 26fe9e2b9978a..73aaa71b2282f 100644 --- a/util/settings/settings_test.go +++ b/util/settings/settings_test.go @@ -419,7 +419,7 @@ func Test_validateExternalURL(t *testing.T) { }{ {name: "Valid URL", url: "https://my.domain.com"}, {name: "No URL - Valid", url: ""}, - {name: "Invalid URL", url: "my.domain.com", errMsg: "URL must inlcude http or https protocol"}, + {name: "Invalid URL", url: "my.domain.com", errMsg: "URL must include http or https protocol"}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {