-
Notifications
You must be signed in to change notification settings - Fork 324
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
Make sure integration tests use most recent API version #2695
Conversation
41445d8
to
15d9bd9
Compare
15d9bd9
to
34d9929
Compare
f6b93fa
to
08abf85
Compare
08abf85
to
d6568cc
Compare
d6568cc
to
6e22f36
Compare
068bdd5
to
fa7dd56
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.
Overall this looks good.
I have concerns with using an unversioned service and then prefixing manually "v1". Also, I found a combination of unversioned + v1 + the v2 suffix.
The Util module in Galley tests has lots of unversioned + v1. Could this be changed to something like apiVersion
in other services?
@@ -135,6 +136,38 @@ type Spar = Request -> Request | |||
|
|||
data FedClient (comp :: Component) = FedClient HTTP.Manager Endpoint | |||
|
|||
-- | Note: Apply this function last when composing (Request -> Request) functions | |||
apiVersion :: ByteString -> Request -> Request |
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.
A nit-pick: why not make the first argument a specific version, e.g., V1
instead of a ByteString
? When there will be a need to change use sites of apiVersion
, we can grep for apiVersion
in the project, but I thought it'd be even nicer if we used versions instead of their string representations.
b <- view tsUnversionedBrig | ||
r2 <- | ||
post (b . zUser alice . path "/users/prekeys" . json (missingClients x)) | ||
post (b . zUser alice . path "v1/users/prekeys" . json (missingClients x)) |
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.
ditto
g <- view tsUnversionedGalley | ||
post $ | ||
g | ||
. path "/conversations/list/v2" | ||
. path "/v1/conversations/list/v2" |
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.
Unversioned in addition to being at v1? Is there no function apiVersion
in Galley tests? I think it'd be worth it creating a small test package that has utilities like apiVersion
instead of copy-pasting it several times.
I'll merge for now. We can think about changing |
Checklist
changelog.d