-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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(ssh_tunnel): Delete command & exceptions #22131
feat(ssh_tunnel): Delete command & exceptions #22131
Conversation
- Add Delete Command and its exceptions
57ef095
to
2edb163
Compare
self._model_id = model_id | ||
self._model: Optional[SSHTunnel] = None | ||
|
||
def run(self) -> Model: |
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.
can we write a small unit test for deleting this the same way as the last PR we have
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.
Oh yeah! Let me add those for this and the update one
|
||
|
||
class SSHTunnelDeleteFailedError(DeleteFailedError): | ||
message = _("SSH Tunnel could not be deleted.") |
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.
can you add a status 500
on this one
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 parent class already has status = 500
so it should be already there.
message = _("SSH Tunnel could not be deleted.") | ||
|
||
|
||
class SSHTunnelNotFoundError(CommandException): |
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.
add a status 404 on this one
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.
Will do 👍
- Move our SSH tunnel DAO, commands, model and exceptions to its own folder inside databases directory - Adjust some imports with the new paths - Add tests to our Delete command
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION