Skip to content
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

Add StackMode to make stack traces configurable #588

Merged
merged 1 commit into from Oct 8, 2021

Conversation

miketonks
Copy link
Contributor

Adds StackMode as an optional parameter to Convey, in the same way that FailureMode is implemented.

StackMode can be Error (default - print stack only on errors) or Fail (print stack for failure and errors).

Fixes: Make stacktrace on error optional #566

@violin0622
Copy link

Thanks, this is exactly what I want.

@miketonks
Copy link
Contributor Author

Any chance for someone to review this?

@miketonks
Copy link
Contributor Author

Thanks @chrishili

What's next step. Any change to merge this and make a release?

@riannucci
Copy link
Collaborator

Hm... I'm not sure why this wasn't merged... If by any chance you're still using goconvey, can you confirm that this still works?

@ghost
Copy link

ghost commented Aug 27, 2021

why this wasn't merged ?

@ezk84
Copy link
Contributor

ezk84 commented Oct 8, 2021

Have been using the StackMode fork for close to a year and hasn't been a problem for me, so please merge!

@riannucci riannucci merged commit 8cae8f6 into smartystreets:master Oct 8, 2021
@riannucci
Copy link
Collaborator

Neat! I like it :)

@ezk84
Copy link
Contributor

ezk84 commented Oct 8, 2021

😱 I should have checked against the latest version of master when in fact I had been using a fork based off a version that was more than a year old. This is now leading to a compile error when running tests.

It's a single line change, so I submitted PR #633 to address it. Please merge and re-release 1.6.5.

@sstulio
Copy link

sstulio commented Oct 12, 2021

Can someone guide me on how to use it now? Where can I set the StackMode while running go test?

@miketonks
Copy link
Contributor Author

Thanks @ezk84 @riannucci ❤️ 🥳

@miketonks
Copy link
Contributor Author

@sstulio

	Convey("When foo ...", StackFail, func() {

@miketonks miketonks deleted the stack-mode branch October 13, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants