)]}'
{"specs/xena/approved/glance/policy-tests-refactoring.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"046be1dab7726b15861e39a8d6b04608cdef8270","unresolved":true,"context_lines":[{"line_number":11,"context_line":":project: Glance"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":":problem: At the moment our unit and functional tests are referring to"},{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"}],"source_content_type":"text/x-rst","patch_set":1,"id":"703b0f0b_724be578","line":14,"range":{"start_line":14,"start_character":40,"end_line":14,"end_character":41},"updated":"2021-06-24 13:43:40.000000000","message":"Umm, windows? :) These should be forward slashes.","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"55481cc1294bd42b46c2affdd924217a18686a25","unresolved":false,"context_lines":[{"line_number":11,"context_line":":project: Glance"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":":problem: At the moment our unit and functional tests are referring to"},{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"}],"source_content_type":"text/x-rst","patch_set":1,"id":"0d362a33_ff6c6013","line":14,"range":{"start_line":14,"start_character":40,"end_line":14,"end_character":41},"in_reply_to":"703b0f0b_724be578","updated":"2021-06-25 06:13:49.000000000","message":"Done","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"046be1dab7726b15861e39a8d6b04608cdef8270","unresolved":true,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":":problem: At the moment our unit and functional tests are referring to"},{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"},{"line_number":18,"context_line":"          from the policy.yaml file and we will not be able to override"}],"source_content_type":"text/x-rst","patch_set":1,"id":"02bb5c17_41349764","line":15,"range":{"start_line":15,"start_character":51,"end_line":15,"end_character":64},"updated":"2021-06-24 13:43:40.000000000","message":"into refactoring the","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"55481cc1294bd42b46c2affdd924217a18686a25","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":":problem: At the moment our unit and functional tests are referring to"},{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"},{"line_number":18,"context_line":"          from the policy.yaml file and we will not be able to override"}],"source_content_type":"text/x-rst","patch_set":1,"id":"cd88719c_bbef83f5","line":15,"range":{"start_line":15,"start_character":51,"end_line":15,"end_character":64},"in_reply_to":"02bb5c17_41349764","updated":"2021-06-25 06:13:49.000000000","message":"Done","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"046be1dab7726b15861e39a8d6b04608cdef8270","unresolved":true,"context_lines":[{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"},{"line_number":18,"context_line":"          from the policy.yaml file and we will not be able to override"},{"line_number":19,"context_line":"          them as per our requirements."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":":solution: Instead of using policies from policy.yaml file we should"},{"line_number":22,"context_line":"           refactor existing tests to use default policies and also"}],"source_content_type":"text/x-rst","patch_set":1,"id":"4ca03fae_dbff7742","line":19,"range":{"start_line":17,"start_character":59,"end_line":19,"end_character":39},"updated":"2021-06-24 13:43:40.000000000","message":"I\u0027m not sure what this sentence means exactly. We can\u0027t easily override the policies for functional tests, so maybe you mean \"these should be the defaults since we can\u0027t easily change them per-test\" or something?\n\nI think maybe just sticking to the theme of \"we should be testing our defaults except where we want to test something specifically different.\"","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"55481cc1294bd42b46c2affdd924217a18686a25","unresolved":true,"context_lines":[{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"},{"line_number":18,"context_line":"          from the policy.yaml file and we will not be able to override"},{"line_number":19,"context_line":"          them as per our requirements."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":":solution: Instead of using policies from policy.yaml file we should"},{"line_number":22,"context_line":"           refactor existing tests to use default policies and also"}],"source_content_type":"text/x-rst","patch_set":1,"id":"d4921f2b_344bab01","line":19,"range":{"start_line":17,"start_character":59,"end_line":19,"end_character":39},"in_reply_to":"4ca03fae_dbff7742","updated":"2021-06-25 06:13:49.000000000","message":"there are certain existing tests which sets some were writing new rules to the policy file while testing some policy operations, so I thought whether we should provide similar way to override the policy rule.\n\nhttps://github.com/openstack/glance/blob/master/glance/tests/unit/test_policy.py#L283\nhttps://github.com/openstack/glance/blob/master/glance/tests/unit/base.py#L120","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e887768db55325efa030647ef3963cf02a9742ce","unresolved":true,"context_lines":[{"line_number":14,"context_line":"          policy.yaml located in `glance\\tests\\etc` of the project"},{"line_number":15,"context_line":"          repository. As now we are putting efforts refactoring policy"},{"line_number":16,"context_line":"          layer in glance it will be difficult to provide better unit"},{"line_number":17,"context_line":"          and functional test coverage as policies will be referred"},{"line_number":18,"context_line":"          from the policy.yaml file and we will not be able to override"},{"line_number":19,"context_line":"          them as per our requirements."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":":solution: Instead of using policies from policy.yaml file we should"},{"line_number":22,"context_line":"           refactor existing tests to use default policies and also"}],"source_content_type":"text/x-rst","patch_set":1,"id":"18d787f7_78540a64","line":19,"range":{"start_line":17,"start_character":59,"end_line":19,"end_character":39},"in_reply_to":"d4921f2b_344bab01","updated":"2021-06-28 13:43:00.000000000","message":"Those are unit tests which don\u0027t use policy.yaml. But, if you\u0027re saying we need some easy way for *functional* tests to override rules easily, then that makes sense. You can pass policy_file to those functional test base classes, but some better way to make it easy to override one rule would be good.","commit_id":"10630c3e59c24bb2aa145e9691e2326746db57b8"}]}
