-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Test all api versions #1473
Comments
What about tests that cover features specific to a version, or conversion between? Maybe move all of those to use latest.Version so we don't accidentally delete them for appearing old. |
Those tests just exit early if the passed in flag doesn't match their target version. |
Should we consider this required for 1.0? Sorry for the super-naive question, but how are we handling this today? Do we only test v1? Which tests actually depend on the API version? |
As I commented in #5687, I'm a bit worried about testing all API versions in |
Thanks for looking at that PR @ixdy. What do you think? |
Testing all version in travis makes sense (but not by default). If it's an ENV var switch it should be clear what caused the failure, and users can easily recreate. My 2c ----- Original Message -----
|
@smarterclayton Yes there is an echo at the top of the script that prints the API version for which the tests were run. I discussed this with @bgrant0607 and he agreed that we can run the tests just once on travis (picking a version at random) and testing both versions locally. |
Fixed by #5687. |
We need to make our tests parameterized for api version, e.g., via a command-line flag. Then we need to make hack/test-go.sh run our tests once for each version we support.
Ad-hoc testing of different versions is going to be error prone and repeat a bunch of logic unnecessarily.
Concrete steps:
a. Make an api/test library
b. It defines a command-line flag
c. It defines a Codec, etc (like the api/latest package) which is set based off of the command line flag
d. Tests everywhere are changed to import this library and use its Codec.
e. The testing script runs tests once for each version.
The text was updated successfully, but these errors were encountered: