Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uptests: move tests to testutil #3242
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm strongly in favour. |
This comment has been minimized.
This comment has been minimized.
|
Hey, I'm interested in working on this issue :) |
This comment has been minimized.
This comment has been minimized.
|
Hey @jlevesy, good to know. This issue luckily requires little context but is also a little big. Currently we have tests using just the standard lib which makes checking for failures/conditions verbose, for example: https://github.com/prometheus/prometheus/blob/master/storage/local/series_test.go#L38-L41 and https://github.com/prometheus/prometheus/blob/master/storage/local/series_test.go#L42-L44 But when using Now we want to move all the tests from stdlib to testify in this repo, but as we have too many tests, I will be breaking it into each package in the repo: (Just something I came up with the directory structure, please feel free to open more or less PRs per folder depending on the size Also, as we are soon going to merge the If you have any more questions, please feel free to comment here or on IRC. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the quick and clear answer. I'll try to open a PR asap once I'm done with the web package, just to make sure I'm in the right direction :). |
This comment has been minimized.
This comment has been minimized.
|
@jlevesy there is a discussion around this on IRC at the moment, I would suggest to hold off for a moment |
This comment has been minimized.
This comment has been minimized.
|
@jlevesy Sorry about that, there was a discussion right after I posted here and we essentially just use a small subset of Essentially not much changes from the above description except |
This comment has been minimized.
This comment has been minimized.
|
Okay, sounds to me.
On Thu, 5 Oct 2017 at 13:26 Frederic Branczyk ***@***.***> wrote:
@jlevesy <https://github.com/jlevesy> there is a discussion around this
on IRC at the moment, I would suggest to hold off for a moment
--
Julien Levesy
|
jlevesy
referenced this issue
Oct 5, 2017
Merged
Imports benbjohnson/testing and use it in web package #3245
This comment has been minimized.
This comment has been minimized.
|
Is there room for another helping hand? I would like to help with the tests of the config package. |
This comment has been minimized.
This comment has been minimized.
cored
commented
Oct 5, 2017
|
@jlevesy @gouthamve do you need more hands on this? I would like to help out. |
This comment has been minimized.
This comment has been minimized.
|
@alcortesm @cored Sure! But I think its best to wait for #3245 to get merged in and once that is done, each of you could pick a package and send in a PR :) |
This was referenced Oct 11, 2017
jlevesy
referenced this issue
Oct 12, 2017
Merged
Use testutil assertion helpers in cmd package #3285
grobie
closed this
in
#3269
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
|
Is that issue really closed ? |
grobie
reopened this
Oct 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks @jlevesy for catching this. It got auto-closed. |
grobie
changed the title
tests: move tests to stretchr/testify
tests: move tests to testutil
Oct 13, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm currently working on the discovery package, however I noticed Am I supposed to get rid of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Happy to extend our testutil package to our needs (to a reasonable degree), and also happy to get rid of the |
This comment has been minimized.
This comment has been minimized.
|
Just opened #3292 so you can see what I have in mind :) |
grobie
added
the
component/tests
label
Nov 12, 2017
This comment has been minimized.
This comment has been minimized.
|
Hi, I'm interested to working on this issue too. Can I join and PR for other packages ? |
This comment has been minimized.
This comment has been minimized.
|
Hi, I created #3695 for |
This was referenced Jan 28, 2018
This comment has been minimized.
This comment has been minimized.
|
This is an updated list of packages that need to be fixed, prepared by @gouthamve (above).
|
This comment has been minimized.
This comment has been minimized.
|
I'm trying to rewrite test for
In How about move |
elifkus
referenced this issue
Apr 15, 2018
Merged
Rewrote tests with testutil for several test files #4086
This comment has been minimized.
This comment has been minimized.
|
The same "import cycle not allowed in test" error happens in pkg/labels/matcher_test.go . Similar to the error @smonv received.
|
This comment has been minimized.
This comment has been minimized.
|
I have started working on the discovery package. |
janickic
referenced this issue
Sep 17, 2018
Merged
Change discovery subpackages to not use testify in tests #4612
This comment has been minimized.
This comment has been minimized.
|
So there are still some places which need to be update, namely:
Almost there :) |
gouthamve commentedOct 5, 2017
tsdb is using the require library of testify and its much less verbose and cleaner. Should we also migrate the tests everywhere?
/cc @brian-brazil @grobie @fabxc