Skip to content

Commit 324bcd1

Browse files
authored
fix policies typo (streamnative#1034)
### Motivation * fix typo `polices` by changing it to `policies` everywhere
1 parent 8fed82f commit 324bcd1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/ctl/namespace/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func doCreate(vc *cmdutils.VerbCmd, data utils.NamespacesData) error {
124124
policies.ReplicationClusters = data.Clusters
125125
}
126126

127-
err = admin.Namespaces().CreateNsWithPolices(ns.String(), *policies)
127+
err = admin.Namespaces().CreateNsWithPolicies(ns.String(), *policies)
128128
if err == nil {
129129
vc.Command.Printf("Created %s successfully\n", ns.String())
130130
}

pkg/ctl/namespace/policies_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/stretchr/testify/assert"
2626
)
2727

28-
func TestPolicesCommand(t *testing.T) {
28+
func TestPoliciesCommand(t *testing.T) {
2929
args := []string{"create", "public/test-policy-namespace"}
3030
createOut, _, _, err := TestNamespaceCommands(createNs, args)
3131
assert.Nil(t, err)
@@ -51,21 +51,21 @@ func TestPolicesCommand(t *testing.T) {
5151
}
5252
}
5353

54-
func TestPolicesNsArgsError(t *testing.T) {
54+
func TestPoliciesNsArgsError(t *testing.T) {
5555
args := []string{"policies"}
5656
_, _, nameErr, _ := TestNamespaceCommands(getPolicies, args)
5757
assert.Equal(t, "the namespace name is not specified or the namespace name is "+
5858
"specified more than one", nameErr.Error())
5959
}
6060

61-
func TestPolicesNonExistTenant(t *testing.T) {
61+
func TestPoliciesNonExistTenant(t *testing.T) {
6262
args := []string{"policies", "non-existent-tenant/default"}
6363
_, execErr, _, _ := TestNamespaceCommands(getPolicies, args)
6464
assert.NotNil(t, execErr)
6565
assert.Equal(t, "code: 404 reason: Namespace does not exist", execErr.Error())
6666
}
6767

68-
func TestPolicesNonExistNs(t *testing.T) {
68+
func TestPoliciesNonExistNs(t *testing.T) {
6969
args := []string{"policies", "public/test-not-exist-ns"}
7070
_, execErr, _, _ := TestNamespaceCommands(getPolicies, args)
7171
assert.NotNil(t, execErr)

0 commit comments

Comments
 (0)