Skip to content

Migrate legacy HTTP tests#2759

Merged
mislav merged 1 commit intocli:trunkfrom
cristiand391:migrate-legacy-tests
Jan 12, 2021
Merged

Migrate legacy HTTP tests#2759
mislav merged 1 commit intocli:trunkfrom
cristiand391:migrate-legacy-tests

Conversation

@cristiand391
Copy link
Copy Markdown
Contributor

Ref #2727 (comment)
Ref #874
Ref #760

This PR replaces all use of StubResponse with their corresponding GraphQL/REST httpmock equivalent.
Other than matching requests based on their contents, no functional changes were introduced.

}{}
_ = json.Unmarshal(bodyBytes, &reqBody)

eq(t, reqBody.Variables.Input.RepositoryID, "REPOID")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions are now handled by httpmock.GraphQLMutation

Copy link
Copy Markdown
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic! The new assertions look so much better. Thank you! 🌟

@mislav mislav merged commit 3985577 into cli:trunk Jan 12, 2021
@cristiand391 cristiand391 deleted the migrate-legacy-tests branch January 12, 2021 17:46
@vilmibm
Copy link
Copy Markdown
Contributor

vilmibm commented Jan 12, 2021

thank you!!

Copy link
Copy Markdown

@zeffmichael65 zeffmichael65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##- [ ] [```

Copy link
Copy Markdown

@zeffmichael65 zeffmichael65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants