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 deployment merge request api #1098

Open

Conversation

@ludwig-weiss
Copy link

@ludwig-weiss ludwig-weiss commented May 14, 2020

@ludwig-weiss ludwig-weiss force-pushed the ludwig-weiss:995-add-deployment-merge-request-api branch from c1d3160 to e061934 May 14, 2020
@max-wittig
Copy link
Member

@max-wittig max-wittig commented May 16, 2020

Hi @ludwig-weiss. Thanks for your MR! Would you mind to add a couple of tests and some docs?

@ludwig-weiss
Copy link
Author

@ludwig-weiss ludwig-weiss commented May 18, 2020

Hi @ludwig-weiss. Thanks for your MR! Would you mind to add a couple of tests and some docs?

Not at all, but I was unsure what and how to test. Could you point me to an example?

@max-wittig
Copy link
Member

@max-wittig max-wittig commented May 18, 2020

I guess the tests are going through a little transition phase right now, regarding their structure. Sorry! But you can just add tests similar to this: https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/tests/objects/test_projects.py. Thanks 👍

@ludwig-weiss
Copy link
Author

@ludwig-weiss ludwig-weiss commented May 18, 2020

I am not a python/python tests pro. The example seems too broad to me.

Is there a test for e.g ProjectPipelineJobManager https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/v4/objects.py#L3651

This seems similar to the classes I added.
A manager with only ListMixin and RestManager added.

When I try to figure what to test for this GET only API I come to this:

  • mock one or more results of this api
  • call the code
  • compare the result with the mock

For this simple GET API I am under the impression that we would test the mock only.
Am I wrong here?

@max-wittig
Copy link
Member

@max-wittig max-wittig commented Jun 30, 2020

Yes it does test the mock only, but the functional tests alone are kind of unreliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.