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
Dashboard: Redirects for old (pre 7.0) edit & view panel urls #25653
Conversation
@@ -55,4 +55,21 @@ func TestMiddlewareDashboardRedirect(t *testing.T) { | |||
}) | |||
}) | |||
}) | |||
|
|||
Convey("Given the dashboard legacy edit panel middleware", t, func() { |
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 might want to rewrite this using the standard testing library, since we're committed to getting rid of Convey.
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.
Then we have to convert this whole file, what test runners are you using?
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.
@torkelo We just use go test
for running tests. In this case, I think it would be easy to write this test without Convey. That's what I usually do when adding new tests, just write them with the standard library, in addition to the existing Convey ones (which I guess we'll clean up at some point).
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.
go test is terrible, have scroll a bunch to see what failed due to stack traces that are more than a screen long, and it does not rerun tests on file change (no watch), so the whole experience I find very poor. Like having a test runner in a tmux split that runs tests on file change and print failures in readable form.
I tried to rewrite this to go testing library but sadly it depends on middlewareScenario which uses GoConvey so have to rewrite hundreds of tests to go testing library to convert this test :(
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.
LGTM
Any scenario where fullscreen param is not provided since this will only apply when fullscreen param is provided. Someone having old links maybe with only panelId param set?
no the old urls always had panelId & fullscreen, and then edit no edit depending on view/edit mode. which is why I simplified the state a big for 7.0 to just have editPanel and viewPanel to cover both states with just two states instead of 3 properties |
(cherry picked from commit d6ed8c5)
(cherry picked from commit d6ed8c5)
Closes #25459