-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Q: While migrating to V2, my specs were skiped #931
Comments
hey @ycyaoxdu sorry you're having trouble. yes, for the most part, it should be as simple as changing Some other things to consider:
|
yes, i'm working on a open source repo, and my test code is in https://github.com/open-cluster-management-io/clusteradm/pull/111/files, mainly the following dour files:
in directory Feeling very sorry to bothering you! i'm not familiar with ginkgo, maybe i just forgot something important. |
thanks @ycyaoxdu - on the whole things look ok except for one exception. It's actually an error to run I would have expected you to get a meaningful error in V2 telling you that Can you try two things for me:
and then run the tests (either with Lastly I notice you're using
No problem at all, am happy to help. |
I extend my sincere thanks to you! Your eyes are so sharp! :) @onsi The issue is actually caused by the misuse of
my test spec works again.
Hahaha, already migrated! And that is the first thing i did after fixed the bug. By the way, I think that the misuse of If this proposal will be considered, I'm willing to contribute to this small feature. |
thanks for the kind words @ycyaoxdu There should have been an error that appeared but it looks like it wouldn't have been a helpful one. I'm fixing that now and will push out a fix soon. In addition, it looks like the |
I just released v2.1.3 which emits an error if By is placed in a container node. |
Hi, I'm really appreciate the new feature Spec Decorators, especially the
Ordered
key word, which may help to split hugeIt
block into some more seprated blocks, make my code more clear.So i'm trying to migrate to v2.
And while I just changed the import name, from
"github.com/onsi/ginkgo"
toginkgo "github.com/onsi/ginkgo/v2"
, and rerun my test, it turns out to this:seems my specs are all skiped.
and i'm followed this recommendation Because of this it is not possible to import and use V1 and V2 in the same package. , i've changed all imports in this package from v1 to v2.
FYI: Change the import path from
"github.com/onsi/ginkgo"
toginkgo "github.com/onsi/ginkgo/v2"
is all I did to test code. And my test command is$ go test -v ./test/e2e/clusteradm -timeout 1800s
In my cognition, v2 is compatible to v1 styled code.
So I'm confused. Can someone help me with this question? thanks a lot.
The text was updated successfully, but these errors were encountered: