Skip to content
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

Add FriendlyMock #786

Merged
merged 11 commits into from Nov 22, 2019
Merged

Add FriendlyMock #786

merged 11 commits into from Nov 22, 2019

Conversation

@zli-simspace
Copy link
Contributor

zli-simspace commented Oct 30, 2019

As discussed in #785, this PR adds FriendlyMock, a "friendlier" version of ServerMock for developer convenience.

It is intended to be called from the REPL iex. I had trouble getting the nested maps on ServerMock in the right state otherwise.

From FriendlyMock's moduledoc:

Helper functions for ServerMock for common operations without having to
modify state by hand.

Tries to lookup values instead of requiring full %{} associative arrays.

Assumes a single GitHub instance with a single repository and single user.

Does everything through webhook notifications. Does not use
Database.Repo.insert directly! (One exception: adding a reviewer,
which is normally done through Bors' web UI.)

@notriddle

This comment has been minimized.

Copy link
Member

notriddle commented Nov 22, 2019

bors r+

bors bot added a commit that referenced this pull request Nov 22, 2019
782: Bump terser-webpack-plugin from 2.1.3 to 2.2.1 in /assets r=notriddle a=dependabot-preview[bot]

Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 2.1.3 to 2.2.1.


786: Add FriendlyMock r=notriddle a=zli-simspace

As discussed in #785, this PR adds `FriendlyMock`, a "friendlier" version of ServerMock for developer convenience.

It is intended to be called from the REPL iex. I had trouble getting the nested maps on ServerMock in the right state otherwise.

From FriendlyMock's moduledoc:

>  Helper functions for ServerMock for common operations without having to
>  modify state by hand.
>
>  Tries to lookup values instead of requiring full %{} associative arrays.
>
>  Assumes a single GitHub instance with a single repository and single user.
>
>  Does everything through webhook notifications. Does not use
>  Database.Repo.insert directly! (One exception: adding a reviewer,
>  which is normally done through Bors' web UI.)


Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: zli <zli@simspace.com>
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Nov 22, 2019

Build succeeded

@bors bors bot merged commit 207eb4c into bors-ng:master Nov 22, 2019
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request Build Passed
Details
bors Build succeeded
Details
notriddle added a commit to bors-ng/bors-ng.github.io that referenced this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.