[openSUSE/open-build-service] d7534d: WIP initial commit
Branch: refs/heads/refactor_trigger_webhooks_controllers Home: https://github.com/openSUSE/open-build-service Commit: d7534d1b20b1501f4cbdc3aa804e3ba00daa715a https://github.com/openSUSE/open-build-service/commit/d7534d1b20b1501f4cbdc3... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- WIP initial commit Commit: 4e325a1779df778732bd586d4c9dc4f7ec0a9374 https://github.com/openSUSE/open-build-service/commit/4e325a1779df778732bd58... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/config/routes/api_routes.rb A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_3_1_1_1.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_2_1_1_1.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_1_1_1_1.yml M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Change route and update cassetes Commit: 668df824128fe7ff1b9273f7a64c6e1353610acc https://github.com/openSUSE/open-build-service/commit/668df824128fe7ff1b9273... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/rebuild.rb M src/api/app/models/token/release.rb M src/api/app/models/token/service.rb M src/api/app/services/trigger_controller_service/token_extractor.rb Log Message: ----------- Reorganize code Commit: 8493fcbe87f230c467a1b0c6caa2a2cfafc126d4 https://github.com/openSUSE/open-build-service/commit/8493fcbe87f230c467a1b0... Author: Eduardo Navarro <enavarro@suse.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token.rb M src/api/app/models/token/rebuild.rb Log Message: ----------- Further refactoring Commit: 249fdb6e253c71c588be8df273c5b6dca9d0affb https://github.com/openSUSE/open-build-service/commit/249fdb6e253c71c588be8d... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token.rb M src/api/app/models/token/rebuild.rb M src/api/app/models/token/release.rb M src/api/app/models/token/service.rb M src/api/app/services/trigger_controller_service/token_extractor.rb Log Message: ----------- the road to the success is under construction Commit: fb011433815407cdbfc9a628476699cdfd2cf2df https://github.com/openSUSE/open-build-service/commit/fb011433815407cdbfc9a6... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/models/token/rebuild.rb Log Message: ----------- WIP: Refactor package.rebuild Commit: 3f809863bdd3d03b75aab68485d50de2073f5353 https://github.com/openSUSE/open-build-service/commit/3f809863bdd3d03b75aab6... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/models/package.rb M src/api/app/models/token/rebuild.rb A src/api/app/policies/token/rebuild_policy.rb Log Message: ----------- WIP: rebuild refactoring Commit: 026b69952c298f5f29774e0caff0cba321a0d22b https://github.com/openSUSE/open-build-service/commit/026b69952c298f5f29774e... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token.rb M src/api/app/models/token/rebuild.rb M src/api/app/models/token/release.rb M src/api/app/models/token/service.rb M src/api/app/policies/token/rebuild_policy.rb A src/api/app/policies/token/release_policy.rb A src/api/app/policies/token/service_policy.rb M src/api/app/services/trigger_controller_service/token_extractor.rb Log Message: ----------- Authorization Commit: 1e94668bdfea4be6839dd6c9e8c7052f9d894c33 https://github.com/openSUSE/open-build-service/commit/1e94668bdfea4be6839dd6... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/service.rb M src/api/app/policies/package_policy.rb M src/api/app/policies/token/rebuild_policy.rb M src/api/app/policies/token/service_policy.rb M src/api/app/services/package_controller_service/rebuild_trigger.rb Log Message: ----------- Implement rebuild token policy Commit: cff6ab465cc29e350978be9786603f5f6d1dd314 https://github.com/openSUSE/open-build-service/commit/cff6ab465cc29e350978be... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger/errors.rb M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/release.rb M src/api/app/policies/package_policy.rb M src/api/app/services/package_controller_service/rebuild_trigger.rb M src/api/app/services/trigger_controller_service/token_extractor.rb M src/api/config/routes/api_routes.rb Log Message: ----------- Clean up code, define set_package callback and more - Redirect rebuild via routes - Use package_from_association_or_params in TriggerController Commit: c3a40dbab4f44293d0b29d07aa32671802882575 https://github.com/openSUSE/open-build-service/commit/c3a40dbab4f44293d0b29d... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/rebuild.rb M src/api/app/models/token/release.rb M src/api/app/policies/token/release_policy.rb M src/api/config/routes/api_routes.rb Log Message: ----------- Finish rebuild and release implementation Commit: c890242ef0a48fc8346ecf8c2e625d9179af28e4 https://github.com/openSUSE/open-build-service/commit/c890242ef0a48fc8346ecf... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- WIP Fix trigger controller specs Commit: fa9ad645fde802710e0d9b1fa79d45ead87e41a6 https://github.com/openSUSE/open-build-service/commit/fa9ad645fde802710e0d9b... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger/errors.rb M src/api/app/controllers/trigger_controller.rb M src/api/app/models/token/rebuild.rb M src/api/app/models/token/release.rb M src/api/app/models/token/service.rb M src/api/config/routes/api_routes.rb Log Message: ----------- Tackle TODOs Commit: f0d4febcd32b12b286de3ac54c3cca317f3082db https://github.com/openSUSE/open-build-service/commit/f0d4febcd32b12b286de3a... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: R src/api/app/controllers/services/webhooks_controller.rb M src/api/app/models/package.rb M src/api/app/models/token/rebuild.rb M src/api/app/services/package_controller_service/rebuild_trigger.rb M src/api/app/services/trigger_controller_service/token_extractor.rb R src/api/spec/cassettes/Services_WebhooksController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_1_3_1_1_1.yml R src/api/spec/cassettes/Services_WebhooksController/_create/with_HTTP_X_HUB_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_1_2_1_1_1.yml R src/api/spec/cassettes/Services_WebhooksController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_1_1_1_1_1.yml R src/api/spec/controllers/services/webhooks_controller_spec.rb Log Message: ----------- Delete more unneeded files Commit: 1d97e4a3fab6eb679bbe4b64a9ecfcc067f1b7e6 https://github.com/openSUSE/open-build-service/commit/1d97e4a3fab6eb679bbe4b... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/factories/tokens.rb A src/api/spec/policies/token/rebuild_policy_spec.rb Log Message: ----------- First commit about rebuild token policy Commit: ec6086e880dbf6b29401d4b0b080b4cf44d51be7 https://github.com/openSUSE/open-build-service/commit/ec6086e880dbf6b29401d4... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: A src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_1.yml A src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_2.yml Log Message: ----------- Cassetes for TokenRebuild Commit: 85b41eeea326fdbb5dc7c2f04ce8c2ad4677d437 https://github.com/openSUSE/open-build-service/commit/85b41eeea326fdbb5dc7c2... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/models/token/release.rb Log Message: ----------- Fix linter for release Commit: e81cdc551fffc098a102aec1af256f701e9edd5f https://github.com/openSUSE/open-build-service/commit/e81cdc551fffc098a102ae... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_1.yml M src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_2.yml M src/api/spec/factories/tokens.rb M src/api/spec/policies/token/rebuild_policy_spec.rb A src/api/spec/policies/token/release_policy_spec.rb Log Message: ----------- Submit specs for Token Rebuild and Release policies Delete the unecessary VCR files (to test the policy we don't need the backend) Commit: 358fcfbe7cd36bbe3173d486d2c90029097e323b https://github.com/openSUSE/open-build-service/commit/358fcfbe7cd36bbe3173d4... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Disable locally the rubocop to make circleci green Commit: 6a7d4a89a260ab5bf1c2a3e9485d5452038c1b00 https://github.com/openSUSE/open-build-service/commit/6a7d4a89a260ab5bf1c2a3... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger/errors.rb M src/api/app/models/token.rb A src/api/app/models/token/errors.rb M src/api/app/models/token/release.rb Log Message: ----------- Fix exception class handling for release token model The location of the exception class definition was wrong and therefore an uninitialized constant error was thrown by the release token model. The naming of the exception class did not quite fit as well. Commit: 5b8cb309a935fa6067ba1496e2a771129aa02953 https://github.com/openSUSE/open-build-service/commit/5b8cb309a935fa6067ba14... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/factories/tokens.rb A src/api/spec/policies/token/service_policy_spec.rb Log Message: ----------- Add service policies spec Commit: 89ed8bf9ddd4d2abfd4c770c496ee10e7fae24f5 https://github.com/openSUSE/open-build-service/commit/89ed8bf9ddd4d2abfd4c77... Author: Victor Pereira <vpereira@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/policies/token/rebuild_policy_spec.rb M src/api/spec/policies/token/release_policy_spec.rb M src/api/spec/policies/token/service_policy_spec.rb A src/api/spec/support/shared_examples/tokens.rb Log Message: ----------- Refactor Token policies to use shared examples Commit: 7f368599196241886fb1fd03c4d965fa7cc9d6c7 https://github.com/openSUSE/open-build-service/commit/7f368599196241886fb1fd... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Fixes `#rebuild` trigger controller spec failures Commit: 7dca4d5d6b5d6941a3d7c576af0f8551b1208019 https://github.com/openSUSE/open-build-service/commit/7dca4d5d6b5d6941a3d7c5... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/models/token.rb Log Message: ----------- Add uniqueness validation for token string On the database level we already ensure the uniqueness of the token string through an uniq index. In order to properly test this in the model specs and to have better exception handling, the validation should also be present in the token model. Commit: 10fd3467a693e0833c0cde04994249d2f668d07a https://github.com/openSUSE/open-build-service/commit/10fd3467a693e0833c0cde... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Fix trigger controller's `#release` method spec failures Commit: 8ee65ed4f82b76eaad768ee30a9850ac3605a66a https://github.com/openSUSE/open-build-service/commit/8ee65ed4f82b76eaad768e... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/cassettes/TriggerController/_runservice/1_3_1.yml M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Fix trigger controller's rebuild method spec failures Commit: e7f4d576c5eab635299c6df29b9ee61013f94702 https://github.com/openSUSE/open-build-service/commit/e7f4d576c5eab635299c6d... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/factories/tokens.rb Log Message: ----------- Move associations and trait inside base token factory Commit: 8579cc192197da5f2489f730aba92abb5915a8f9 https://github.com/openSUSE/open-build-service/commit/8579cc192197da5f2489f7... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/services/trigger_controller_service/token_extractor.rb M src/api/spec/controllers/trigger_controller_spec.rb M src/api/spec/services/trigger_controller_service/token_extractor_spec.rb Log Message: ----------- Fix TokenExtractor and write specs Commit: 397808d904da5ddab04a0cac43a512abe0581ec7 https://github.com/openSUSE/open-build-service/commit/397808d904da5ddab04a0c... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/models/token/service_spec.rb A src/api/spec/models/token_spec.rb Log Message: ----------- Add specs for token base model Commit: 90095079af00a8eff4b3ab644d9888238a37fcf5 https://github.com/openSUSE/open-build-service/commit/90095079af00a8eff4b3ab... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: R src/api/spec/models/token/service_spec.rb Log Message: ----------- Remove Token::Service spec It's testing code which was moved to the service TriggerControllerService::TokenExtractor. Commit: 3bb029d856e698089757b2f5bd2235f8e3701051 https://github.com/openSUSE/open-build-service/commit/3bb029d856e698089757b2... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: A src/api/spec/cassettes/Token_Release/_call/when_a_manual_release_target_is_set/triggers_the_release_process_in_the_backend.yml A src/api/spec/cassettes/Token_Release/_call/when_no_manual_release_target_is_set/throws_an_exception.yml A src/api/spec/cassettes/Token_Release/_call/when_no_release_target_is_set/throws_an_exception.yml A src/api/spec/models/token/release_spec.rb Log Message: ----------- Add specs for release token model Commit: 93d7fc3e628624e8a12410a416823a9f49b81ad2 https://github.com/openSUSE/open-build-service/commit/93d7fc3e628624e8a12410... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/models/token_spec.rb Log Message: ----------- Fix broken validation spec for Token model Commit: 4294b921c89e7a2a646bb1bd5b78aa503948dc2a https://github.com/openSUSE/open-build-service/commit/4294b921c89e7a2a646bb1... Author: Lukas Krause <lkrause@suse.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/spec/cassettes/Token_Release/_call/when_a_manual_release_target_is_set/triggers_the_release_process_in_the_backend.yml M src/api/spec/models/token/release_spec.rb Log Message: ----------- Fix release token model spec The package in the spec did not had a fixed package name which led to problems with the VCR cassettes. Commit: fa053fc5096742c003e4a124f4de552dd3139ad6 https://github.com/openSUSE/open-build-service/commit/fa053fc5096742c003e4a1... Author: Dani Donisa <dani.doni@gmail.com> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_package.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_project.yml M src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_3_1_1_1.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_signature.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_token.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_an_inactive_user.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X-Pagure-Signature-256_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_missing_package_permissions.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_package.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_project.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_2_1_1_1.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_signature.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_token.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_an_inactive_user.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_HUB_SIGNATURE_256_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_missing_package_permissions.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_package.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_entity_does_not_exist/renders_an_error_for_project.yml M src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_signature_is_valid/1_4_1_1_1_1.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_signature.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_token_is_invalid/renders_an_error_with_an_invalid_token.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_an_inactive_user.yml A src/api/spec/cassettes/TriggerController/_create/with_HTTP_X_OBS_SIGNATURE_http_header/behaves_like_it_verifies_the_signature/when_user_has_no_permissions/renders_an_error_for_missing_package_permissions.yml M src/api/spec/cassettes/TriggerController/_rebuild/authentication_token_is_invalid/1_1_1_1.yml M src/api/spec/cassettes/TriggerController/_rebuild/when_token_is_valid_and_packet_rebuild/1_1_2_1.yml A src/api/spec/cassettes/TriggerController/_release/for_inexistent_project/1_2_1_1.yml A src/api/spec/cassettes/TriggerController/_release/when_there_are_no_release_targets/1_2_5_1.yml M src/api/spec/cassettes/TriggerController/_release/when_token_is_valid_and_package_exists/1_2_2_1.yml A src/api/spec/cassettes/TriggerController/_release/when_user_has_no_rights_for_source/1_2_3_1.yml A src/api/spec/cassettes/TriggerController/_release/when_user_has_no_rights_for_target/1_2_4_1.yml A src/api/spec/cassettes/TriggerController/_release/when_user_has_no_rights_for_target/1_2_4_2.yml M src/api/spec/cassettes/TriggerController/_runservice/1_3_1.yml M src/api/spec/controllers/trigger_controller_spec.rb Log Message: ----------- Fix failing specs from Trigger Controller's `#create` method Commit: 373b48a6f7a236ccaed9eff575bd7d0a55059e71 https://github.com/openSUSE/open-build-service/commit/373b48a6f7a236ccaed9ef... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-04-26 (Mon, 26 Apr 2021) Changed paths: M src/api/app/controllers/trigger_controller.rb M src/api/test/functional/source_services_test.rb Log Message: ----------- Fix Minitest tests related to trigger_controller Fixes: 1. Instead of raising the error NoPermissionForActive when authorization isn't passing, we're doing it with Pundit now. This explains why the tests had to be changed. 2. `ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash` was happening since we didn't run permit on the params. Compare: https://github.com/openSUSE/open-build-service/compare/afee6fdf60f0...373b48...
participants (1)
-
Dany Marcoux