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

Easy testdata update for internal/driver tests. #274

Closed
Maaarcocr opened this issue Dec 1, 2017 · 2 comments
Closed

Easy testdata update for internal/driver tests. #274

Maaarcocr opened this issue Dec 1, 2017 · 2 comments

Comments

@Maaarcocr
Copy link

Maaarcocr commented Dec 1, 2017

While working on #271 I had to update one of the testdata files in the internal/driver directory. The folder didn't contain any instruction about how to update them.

Do you think that it would be worth creating a way to easily updating the files? Different snapshot testing libraries offer some flags that you can set so that they update the snapshots for you. Would this be useful if added?

I have hacked together a first draft for this while trying to update the file I had to change in order to make tests pass for #271. This codes lives on a branch on my machine, let me know if you are interested in discussing this further 😄

@aalexand
Copy link
Collaborator

aalexand commented Dec 1, 2017

There is

var updateFlag = flag.Bool("update", false, "Update the golden files")
?

@Maaarcocr
Copy link
Author

@aalexand omg, I'm super sorry, didn't notice this at all! Then, just ignore most of what I said and feel free to close the issue.

I guess it would be beneficial for beginners (like me, as you may have probably guessed) if there was a very short README that informed contributors about this. Something like https://github.com/google/pprof/blob/master/internal/report/testdata/README.md

@aalexand aalexand closed this as completed Dec 1, 2017
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

No branches or pull requests

2 participants