-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add inactive topic policies command for topic #444
Conversation
e1d1290
to
16f8e96
Compare
16f8e96
to
8b43a8f
Compare
pkg/ctl/topic/get_inactive_topic.go
Outdated
|
||
import ( | ||
"github.com/streamnative/pulsarctl/pkg/cmdutils" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the empty line?
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestInactiveTopicCmd(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to add some failure case tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to test the flag required by set-inactive-topic-policies
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failure case is used to check the error response is parsed correctly at the pulsarctl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to test the response from pulsar?
8b43a8f
to
07bffc2
Compare
b8246b2
to
851cdeb
Compare
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
a97367d
to
57cdcf0
Compare
Signed-off-by: Zixuan Liu <nodeces@gmail.com> ### Changes background from #246, the PR implements the following commands: - `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>` - `pulsarctl topics remove-inactive-topic-policies <topic>` - `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>` (cherry picked from commit db4dda4)
…sarctl#444) Signed-off-by: Zixuan Liu <nodeces@gmail.com> ### Changes background from streamnative/pulsarctl#246, the PR implements the following commands: - `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>` - `pulsarctl topics remove-inactive-topic-policies <topic>` - `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>`
…sarctl#444) Signed-off-by: Zixuan Liu <nodeces@gmail.com> ### Changes background from streamnative/pulsarctl#246, the PR implements the following commands: - `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>` - `pulsarctl topics remove-inactive-topic-policies <topic>` - `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>`
Signed-off-by: Zixuan Liu nodeces@gmail.com
Changes
background from #246, the PR implements the following commands:
pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>
pulsarctl topics remove-inactive-topic-policies <topic>
pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>