Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,9 @@ func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut,
Required: true,
},
&cli.StringFlag{
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region. Default: aws",
Value: CloudProviderAWS,
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region.",
Required: true,
},
},
Action: func(ctx *cli.Context) error {
Expand All @@ -831,9 +831,9 @@ func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut,
Required: true,
},
&cli.StringFlag{
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region. Default: aws",
Value: CloudProviderAWS,
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region.",
Required: true,
},
},
Action: func(ctx *cli.Context) error {
Expand Down Expand Up @@ -1673,9 +1673,9 @@ func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut,
Required: true,
},
&cli.StringFlag{
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region. Default: aws",
Value: CloudProviderAWS,
Name: cloudProviderFlagName,
Usage: "The cloud provider of the region.",
Required: true,
},
},
Action: func(ctx *cli.Context) error {
Expand Down
15 changes: 10 additions & 5 deletions app/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1793,10 +1793,10 @@ func (s *NamespaceTestSuite) TestCreate() {
s.Error(s.RunCmd("namespace", "create"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--auth-method", "api_key_or_mtls"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--auth-method", "invalid"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--cloud-provider", "aws", "--auth-method", "api_key_or_mtls"))
s.Error(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--cloud-provider", "aws", "--auth-method", "invalid"))
s.mockService.EXPECT().CreateNamespace(gomock.Any(), gomock.Any()).Return(nil, errors.New("create namespace error")).Times(1)
s.EqualError(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--ca-certificate", "cert1"), "create namespace error")
s.EqualError(s.RunCmd("namespace", "create", "--namespace", "ns1", "--region", "us-west-2", "--cloud-provider", "aws", "--ca-certificate", "cert1"), "create namespace error")
s.mockService.EXPECT().CreateNamespace(gomock.Any(), gomock.Any()).Return(&namespaceservice.CreateNamespaceResponse{
RequestStatus: &request.RequestStatus{},
}, nil).AnyTimes()
Expand All @@ -1812,6 +1812,7 @@ func (s *NamespaceTestSuite) TestCreate() {
"namespace", "create",
"--namespace", "ns1",
"--region", "us-west-2",
"--cloud-provider", "aws",
"--ca-certificate", "cert1",
"--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }",
"--search-attribute", "testsearchattribute=Keyword",
Expand All @@ -1821,6 +1822,7 @@ func (s *NamespaceTestSuite) TestCreate() {
"namespace", "create",
"--namespace", "ns1",
"--region", "us-west-2",
"--cloud-provider", "aws",
"--auth-method", "api_key",
"--search-attribute", "testsearchattribute=Keyword",
"--user-namespace-permission", "testuser@testcompany.com=Read",
Expand All @@ -1843,6 +1845,7 @@ func (s *NamespaceTestSuite) TestCreateWithCodec() {
"namespace", "create",
"--namespace", "ns1",
"--region", "us-west-2",
"--cloud-provider", "aws",
"--ca-certificate", "cert1",
"--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }",
"--search-attribute", "testsearchattribute=Keyword",
Expand All @@ -1854,6 +1857,7 @@ func (s *NamespaceTestSuite) TestCreateWithCodec() {
"namespace", "create",
"--namespace", "ns1",
"--region", "us-west-2",
"--cloud-provider", "aws",
"--ca-certificate", "cert1",
"--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }",
"--search-attribute", "testsearchattribute=Keyword",
Expand All @@ -1867,6 +1871,7 @@ func (s *NamespaceTestSuite) TestCreateWithCodec() {
"namespace", "create",
"--namespace", "ns1",
"--region", "us-west-2",
"--cloud-provider", "aws",
"--ca-certificate", "cert1",
"--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }",
"--search-attribute", "testsearchattribute=Keyword",
Expand Down Expand Up @@ -2754,8 +2759,8 @@ func (s *NamespaceTestSuite) TestRemoveNamespaceRegion() {
expectErr bool
}{
{
name: "Validate default cloud provider",
args: []string{"namespace", "delete-region", "--namespace", ns, "--region", "us-west-2"},
name: "Validate AWS cloud provider",
args: []string{"namespace", "delete-region", "--namespace", ns, "--region", "us-west-2", "--cloud-provider", "aws"},
expectRequest: func(r *cloudservice.DeleteNamespaceRegionRequest) {
r.Namespace = ns
r.Region = "aws-us-west-2"
Expand Down
2 changes: 1 addition & 1 deletion app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
// MinSupportedVersion is the minimum tcld version supported by our APIs.
// This string must be updated when we deprecate older versions, but should be
// done carefully as this will likely break user's current usage of tcld.
MinSupportedVersion = "v0.17.0"
MinSupportedVersion = "v0.22.0"

// DefaultVersionString is the version which is sent over if no version was available.
// This can happen if a user builds the latest main branch, as the version string provided
Expand Down