AlanCoding
74beca5b74
cleanup of Job Template tests and fixtures
2016-05-31 16:03:03 -04:00
AlanCoding
1a4c92f027
make some JT tests unit tests and update others
2016-05-31 14:34:51 -04:00
AlanCoding
07cc99b4c7
start updating tests to JT factory
2016-05-31 14:34:51 -04:00
AlanCoding
cfd9d5d4f1
Refactor of JT related field checking
2016-05-31 14:34:51 -04:00
AlanCoding
1ec2c1b3b7
new tests, and stricter can_copy can_edit
2016-05-31 14:34:51 -04:00
Wayne Witzel III
7395e07221
Merge pull request #2068 from wwitzel3/issue_3.0_1990
...
Fix ActivityStream when object2 is a role.
2016-05-27 15:45:53 -04:00
Wayne Witzel III
31d3e3ec55
mock activity stream license and make query more specific
2016-05-27 15:21:24 -04:00
Akita Noek
1a9fece262
Merge pull request #2075 from anoek/1981
...
Better control what JT admins are allowed to do
2016-05-27 15:00:09 -04:00
Akita Noek
e3fcdf9ba8
Unobfuscated some decorators
2016-05-27 14:18:05 -04:00
Akita Noek
f6da30dde3
Avoid unnecessary license checks
2016-05-27 09:32:29 -04:00
Wayne Witzel III
61208f6a77
content_object can be None, that is what we care about
2016-05-26 15:45:16 -04:00
Wayne Witzel III
e6c76d0941
fixup objects creation helpers
2016-05-26 15:45:14 -04:00
Wayne Witzel III
2e0686a173
tests for object2 type when it is a role
2016-05-26 15:45:12 -04:00
Wayne Witzel III
13f0b440c3
discover content type when object2 is a role
2016-05-26 15:45:10 -04:00
Wayne Witzel III
db93fdab4a
exercise role signal for job_template type
2016-05-26 15:26:55 -04:00
Alan Rominger
b0526cdd6a
Merge pull request #2015 from AlanCoding/1997_AS_naming_bug
...
Fix ActivityStream naming mismatch bug
2016-05-26 15:21:41 -04:00
Akita Noek
c5dfde236b
Test "fix"
...
Having this triggers a license feature test, which the jenkins test
system apparently doesn't have.. I don't think it's particularly
important to test this particular field, so meh.
2016-05-26 15:18:23 -04:00
Akita Noek
e531bc67e4
Better control what JT admins are allowed to do
...
This addresses #1981 which says that JT admins can make modifications to
a job template freely if they're just changing non functional things
like name, description, forks, verbosity, etc, while requiring them to
have access to all functional components if they're going to make any
changes to the functionality - in specific, any changes to the
inventory, project, playbook, or credentials requires that the user have
the appropriate use access on all of those things in order to make the
change.
2016-05-26 14:39:16 -04:00
Akita Noek
fed8d49d86
Added optional "expect" arg for REST fixtures"
2016-05-26 13:58:26 -04:00
Akita Noek
aca858f5b2
Ported some old adhoc tests over to the new system
2016-05-26 13:58:16 -04:00
Akita Noek
5ea372ae43
Updated Job.limit expectation in old tests
...
See 821c43ba88d18feaded696e9994a9c5277a3195b
2016-05-26 13:58:08 -04:00
Akita Noek
aa49e071c6
Disabling RAX test until we get our cert issue figured out
...
Related to #1706
2016-05-26 13:57:55 -04:00
Alan Rominger
95ccdecf13
Merge pull request #2010 from AlanCoding/1999_see_your_own_JT_30
...
Automatically add JT creator to admin_role
2016-05-26 12:32:27 -04:00
Wayne Witzel III
b8865c3749
make arguments to mk_ methods explicit
2016-05-26 11:02:09 -04:00
Wayne Witzel III
ec505f3f60
adjusting test and renaming helper
2016-05-26 11:02:07 -04:00
Wayne Witzel III
a6e97626ba
README updates
2016-05-26 11:02:05 -04:00
Wayne Witzel III
1189ce033a
fixing broken test cases
2016-05-26 11:02:04 -04:00
Wayne Witzel III
2052f93792
fixing function calls and None handling
2016-05-26 11:02:02 -04:00
Wayne Witzel III
c514cd44c3
restructure factories/fixtures and fix tests
2016-05-26 11:01:58 -04:00
Wayne Witzel III
fa010c2228
fix mk_label method
2016-05-26 11:01:57 -04:00
Wayne Witzel III
aaabc2582d
refactored roles handling and added some more tests
2016-05-26 11:01:55 -04:00
Wayne Witzel III
4453e48729
updated factories docs
2016-05-26 11:01:53 -04:00
Wayne Witzel III
73e41ef6cc
flake8 fixes
2016-05-26 11:01:52 -04:00
Wayne Witzel III
2f09c7fee1
added test for factory roles
2016-05-26 11:01:50 -04:00
Wayne Witzel III
3877804599
updated test to use new organization_factory
2016-05-26 11:01:48 -04:00
Wayne Witzel III
7ab385524d
added roles support for organization_factory
2016-05-26 11:01:46 -04:00
Wayne Witzel III
becce311fe
cleanup make methods and update asserts
2016-05-26 11:01:44 -04:00
Wayne Witzel III
bcef4a698c
updating some tests to use new factories
2016-05-26 11:01:41 -04:00
Wayne Witzel III
0516ef02ca
adding new factories
2016-05-26 11:01:39 -04:00
Graham Mainwaring
6723a385f0
Fix PYTHONPATH to use the correct lib dir when using a venv from a different Python version
2016-05-25 16:51:21 -04:00
Akita Noek
19dcc06c9d
Read permissions goes to read_role, not use_role
...
Dork.
2016-05-24 21:10:43 -04:00
Akita Noek
899ff8ed3b
flake8
2016-05-24 13:19:55 -04:00
Akita Noek
81f093b1c0
Opt to rebuild all roles in helper method
...
This code was fine for the 0009 migrations since we introduced all roles
at once, however with changes in 0017 we can't just patch from the
roots, so this works generically without having to get fancy about
identifying which roles we need to actually update.
2016-05-24 12:46:43 -04:00
Akita Noek
8aa4df1b78
Fix job template migrations again
...
Eliminated some incorrect wtf filtering in permissions, and fixed up the
credential access checks.
2016-05-24 12:45:22 -04:00
Akita Noek
5dbce56beb
When migrating, grant read_role instead of use_role appropriately
...
Only give read access to folks that didn't have explicit permissions to
use a project in a job template before.
2016-05-24 12:42:51 -04:00
Akita Noek
5eb67411a4
Rebuild role hierarchy after making changes in migrations
...
Signals don't fire in migrations, so gotta do this step manually
2016-05-24 12:38:25 -04:00
Akita Noek
a5bc62d7d4
enforce use_role access on both inventory and project when adding a JT
2016-05-24 12:37:44 -04:00
AlanCoding
9ed77508a7
fix naming problem with ActivityStream logging
2016-05-23 16:48:30 -04:00
AlanCoding
f695caf1ac
auto associate JT creator with admin_role
2016-05-23 14:56:23 -04:00
AlanCoding
dfec286bed
All non-superusers to create prompted JTs
2016-05-20 15:30:58 -04:00