stable

Clone or download

Read-only

fix: Polish Synchronize REST route

Part of story #26799 associate a Tuleap project and a GitLab group No functional change expected when calling the POST synchronize REST route. Notes: - We should not compare datetime values in tests unless we control them. Passing the datetime from an upper level makes us able to inject it in the test and avoid flaky results. - PFUser has been moved in SynchronizeGroupLinkCommand. We can have only one parameter that way. - GroupTokenNotFoundFault was no longer built in production code, so it's been removed. - Some minor tweaking of the docblock for the REST route. IMO it's not necessary to explain how to delete things, people who will read this will probably be in the API Explorer and can figure that out by themselves. - GitlabProjectIntegrator takes IntegrateRepositoriesInGroupLinkCommand as parameter (1 parameter instead of 4) - GroupLinkSynchronizerTest should assert that the last sync date has been changed (it's an important side-effect). Change-Id: Iafd7ace472bae51b53b214bce2262369f48ef242

Modified Files

Name
M plugins/gitlab/include/Group/GitlabGroupDAO.php +2 −3 Go to diff View file
M plugins/gitlab/include/Group/GroupLinkSynchronizer.php +4 −10 Go to diff View file
M plugins/gitlab/include/Group/SynchronizeGroupLinkCommand.php +1 −1 Go to diff View file
D plugins/gitlab/include/Group/Token/GroupTokenNotFoundFault.php +0 −36 Go to diff View file
M plugins/gitlab/include/Group/UpdateSynchronizationDate.php +1 −1 Go to diff View file
M plugins/gitlab/include/REST/v1/FaultMapper.php +1 −2 Go to diff View file
M plugins/gitlab/include/REST/v1/GitlabGroupResource.php +7 −6 Go to diff View file
M plugins/gitlab/include/Repository/GitlabProjectIntegrator.php +5 −9 Go to diff View file
M plugins/gitlab/include/Repository/IntegrateGitlabProject.php +2 −11 Go to diff View file
M plugins/gitlab/tests/integration/Group/GitlabGroupDAOTest.php +17 −15 Go to diff View file
M plugins/gitlab/tests/unit/Group/GroupLinkSynchronizerTest.php +6 −4 Go to diff View file
M plugins/gitlab/tests/unit/REST/v1/FaultMapperTest.php +0 −2 Go to diff View file
M plugins/gitlab/tests/unit/Repository/GitlabProjectIntegratorTest.php +19 −16 Go to diff View file
M plugins/gitlab/tests/unit/Test/Stubs/IntegrateGitlabProjectStub.php +2 −6 Go to diff View file
M plugins/gitlab/tests/unit/Test/Stubs/UpdateSynchronizationDateStub.php +3 −4 Go to diff View file