#4251 Add acls pull_request for user api token
Merged by pingou. Opened by lenkaseg.
Unknown source master

Download 4251.patch

Now it's possible to use both user token and project token to open a pull request with the API.
I made sure a pull request cannot be open with another project token.

Looks good, it will need tests though :)

True, I will write them!

1 new commit added

  • acl tests

rebased onto d67624e7191fb2e6da73b18d5ee7803b6653b0db

Results of the tests:
https://pastebin.com/9Zw6whgG

rebased onto 1f0de2546eb8c544b0907f32b7da09bd014eed08

I have an impression that the def setup for my test function will not be generally liked, but I don't know if it's better to split it to the appropriate functions in the __init__.py module or better move it to the test_pagure_flask_api_fork.py inside the test_api_pull_request_user_token?

pretty please pagure-ci rebuild

pretty please pagure-ci rebuild

We'll need a more descriptive name :)

We already have methods to create projects as well as git repos and tokens, we should be able to just reuse them :)

hm, I'm only see changes to the test and to one default value in the configuration, is that expected?

rebased onto 4e94ed70077a0fc82ac9befce5a596d2b1bac9be

hm, I'm only see changes to the test and to one default value in the configuration, is that expected?

yes, it is :)

We already have methods to create projects as well as git repos and tokens, we should be able to just reuse them :)

And how about the specific test just sets it's own resources? :) (I just wanted to make sure there are no interferences for this specific case)

And how about the specific test just sets it's own resources? :) (I just wanted to make sure there are no interferences for this specific case)

Doable but each run starts from a clean slate and just the setUp is called before the method, so up to you :)

Doable but each run starts from a clean slate and just the setUp is called before the method, so up to you :)

Ok, I will try to fit it into the init.py methods :)

rebased onto 41065360a99ade83bf98a607b1276e7125a39ba0

branch: master
change: no, tests: no
expected: pass
actual: pass

branch: acls
change: yes, tests: yes
expected: pass
actual: pass

branch: master_acl_tests
change: no, tests: yes
expected: fail
actual: fail
failed tests: 1
failed test: test_api_pull_request_open_from_branch_to_origin
AssertionError: 401 != 200

rebased onto d2ff0bbcf5ec17af233915f5358234f25e97d4fd

I reused the methods for creating projects, repos and tokens and removed the setup_for_my_function thing.

rebased onto 8250a2ea39dc47e7cb6912a01e668207a0aa4079

Seems I broke 11 other tests with trying to fit it in already made methods :(

rebased onto c93acb3b9438985f49e5946d2d90ef116964cfe1

Only 1 test broken now..let's see if I can fix it. Hints very welcomed :)

rebased onto b1065bf51a46846ef574a9e3f440518d3a973d5b

rebased onto c22f0a20c894492132e4b7813cb9e5524e2982f9

test_pagure_lib.py is failing on master too

rebased onto 2409e93cf207aa2c55365c177a548d5cfe6ee204

Looks good to me, thanks for adjusting the tests :)

If jenkins is happy, we'll get this in :)

rebased onto 3d9cf63506507b01cad0008d2e5ba843d0bb2714

Pull-Request has been merged by pingou

Metadata