-
Notifications
You must be signed in to change notification settings - Fork 163
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
godispatcher: remove convey #3358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @karampok)
go/godispatcher/internal/registration/iatable_test.go, line 35 at r1 (raw file):
func TestIATable(t *testing.T) { table := NewIATable(minPort, maxPort)
Move under each "parent" t.Run
below, otherwise the tests interfere with one another.
In Goconvey this is not the case, because the top-level function runs again for each child Convey
block, thus making "if the entry is only public" operate on a fresh table, and "if the entry is public and svc" on a different fresh table.
go/godispatcher/internal/registration/iatable_test.go, line 129 at r1 (raw file):
func TestIATableSCMPExistingRegistration(t *testing.T) { table := NewIATable(minPort, maxPort)
Same as above.
go/godispatcher/internal/registration/table_test.go, line 29 at r1 (raw file):
var dummyValue = "test value" func TestRegister(t *testing.T) {
All the tests here share the same table
, which would make investigation awkward if one of them breaks (because they are no longer independent).
I think a table driven test fits here instead, with each loop iteration creating a new table.
go/godispatcher/internal/registration/table_test.go, line 124 at r1 (raw file):
func TestRegisterOnlyPublic(t *testing.T) { table := NewTable(minPort, maxPort)
Same as in some previous comments, this should be local to the subtests to make them independent.
go/godispatcher/internal/registration/table_test.go, line 199 at r1 (raw file):
} func TestRegisterWithBind(t *testing.T) {
You can delete this. Binds are never used and going away soon. It should probably be refactored into a table driven test, but it's not worth the effort at this point.
2f1efd2
to
ae38b77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @scrye)
go/godispatcher/internal/registration/iatable_test.go, line 35 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Move under each "parent"
t.Run
below, otherwise the tests interfere with one another.In Goconvey this is not the case, because the top-level function runs again for each child
Convey
block, thus making "if the entry is only public" operate on a fresh table, and "if the entry is public and svc" on a different fresh table.
Done.
go/godispatcher/internal/registration/iatable_test.go, line 129 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Same as above.
Done.k
go/godispatcher/internal/registration/table_test.go, line 29 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
All the tests here share the same
table
, which would make investigation awkward if one of them breaks (because they are no longer independent).I think a table driven test fits here instead, with each loop iteration creating a new table.
Done.
go/godispatcher/internal/registration/table_test.go, line 124 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Same as in some previous comments, this should be local to the subtests to make them independent.
Done.
go/godispatcher/internal/registration/table_test.go, line 199 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
You can delete this. Binds are never used and going away soon. It should probably be refactored into a table driven test, but it's not worth the effort at this point.
Is there an issue to remove everything around Binds?
I would suggest we let it until that story is implemented.
go/godispatcher/internal/registration/table_test.go, line 199 at r1 (raw file): Previously, karampok (Konstantinos) wrote…
Fair enough, this can wait. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
ae38b77
to
898ce85
Compare
Contributes scionproto#3016
898ce85
to
389fb9a
Compare
Contributes #3016
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)