Skip to content
Merged
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
16 changes: 16 additions & 0 deletions temporalcloudcli/commands.namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func (s *SharedServerSuite) TestBasicNamespaceOperations() {
}

func (s *SharedServerSuite) testnamespaceCRUD() {
cloudClient := s.getCloudClient()
// create a new namespace
newNamespaceName := s.generateRandomNamespaceName()

Expand Down Expand Up @@ -68,6 +69,11 @@ func (s *SharedServerSuite) testnamespaceCRUD() {

namespaceID := result.ID

// make sure ns apply is completed
asyncOpID := result.AsyncOp.Id
err = s.pollAsyncOperation(cloudClient, asyncOpID)
s.Suite.Require().NoError(err)

// get the namespace
res = s.Execute(
"namespace",
Expand Down Expand Up @@ -124,6 +130,16 @@ func (s *SharedServerSuite) testnamespaceCRUD() {
"-o=json",
)
s.Suite.Require().NoError(res.Err)
buf, err = io.ReadAll(&res.Stdout)
s.Suite.Require().NoError(err)
result = &temporalcloudcli.MutationResult{}
err = json.Unmarshal(buf, result)
s.Suite.Require().NoError(err)

// make sure ns apply is completed
asyncOpID = result.AsyncOp.Id
err = s.pollAsyncOperation(cloudClient, asyncOpID)
s.Suite.Require().NoError(err)

// get the namespace (after updating)
res = s.Execute(
Expand Down