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

Support for GitLab API 4 - Use docker for testing #207

Merged
merged 9 commits into from
Apr 28, 2017

Conversation

mfriedenhagen
Copy link
Contributor

@mfriedenhagen mfriedenhagen commented Apr 24, 2017

This is a followup based on #206 (Java-API changes are all from this PR) for implementing #201.

Tests are already running successfully using gitlab-ce in Docker on Travis. As I am much more familiar with Maven than Gradle and because releases seem to be done with Maven anyway, I switched the build constructions in Travis to use Maven as well.

iwarapter and others added 2 commits April 23, 2017 20:11
* Switch to Maven in travis because releases are built with Maven anyway
* Introduce Maven-Wrapper to fixate the used Maven version.
* Reuse existing GitlabAPITest as integration test which will be run
  always when docker is available.
* Use docker-maven-plugin for starting/stopping GitLab.
* For use with Maven run `mvn -Pdocker-gitlab clean verify`. Starting
  GitLab takes a long time (>100 seconds on my Macbook Pro).
* For use in the IDE run:

```
mvn -Pdocker-gitlab,docker-ide docker:start
mvn -Pdocker-gitlab,docker-ide docker:stop
```
@mfriedenhagen
Copy link
Contributor Author

mfriedenhagen commented Apr 24, 2017

* username/password sessions per time unit are limited
AssertionError in Tests is only available for >= JDK7
Need to throw AssumptionViolatedException in BeforeClass because
otherwise the class is not initialized correctly.
@timols
Copy link
Owner

timols commented Apr 25, 2017

@mfriedenhagen this is fantastic. Great work.

How do you feel about adding the travisci widget for the README? I'll get travisci added for this repo as well.

Do you think this is ready to merge?

* block/unblock uses POST instead of PUT.
* Add ability to refine permissions for branch protection.
* Add ability to add deploy key with push permission.
@avarne
Copy link

avarne commented Apr 28, 2017

When we can expect the new java-Gitlab_api version which is supported Gitlab API V4

@mfriedenhagen
Copy link
Contributor Author

@timols, I just tried to check all changes as outlined in https://gitlab.com/help/api/v3_to_v4.md, but there are loads.

  • Most of the hard work was already done by @iwarapter.
  • With the docker integration adding additional integration tests should be easier.
  • I think we should merge&release this now and then react quickly to upcoming issues (API 3 support will be gone in June AFAIK)

@timols timols merged commit fecbaa7 into timols:master Apr 28, 2017
@mfriedenhagen mfriedenhagen deleted the use-docker-for-testing branch April 28, 2017 19:57
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