Update available positions in configuration files, pertaining to issue #63 (#117)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Updated available positions adding new positions and removing 2 unused positions in ceo. Passed Drone CI. Co-authored-by: Leon <lzhang219@gmail.com> Reviewed-on: #117 Reviewed-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
This commit is contained in:
parent
de23296413
commit
25994af312
|
@ -5,8 +5,14 @@ position_names = {
|
|||
'secretary': "Secretary",
|
||||
'sysadmin': "Sysadmin",
|
||||
'cro': "Chief Returning Officer",
|
||||
'librarian': "Librarian",
|
||||
'imapd': "IMAPD",
|
||||
'webmaster': "Web Master",
|
||||
'offsck': "Office Manager",
|
||||
'ext-affairs-lead': "External Affairs Lead",
|
||||
'marketing-lead': "Marketing Lead",
|
||||
'design-lead': "Design Lead",
|
||||
'reps-lead': "Reps Lead",
|
||||
'mods-lead': "Mods Lead",
|
||||
'photography-lead': "Photography Lead",
|
||||
'codey-bot-lead': 'Codey Bot Lead',
|
||||
'other': 'Other',
|
||||
}
|
||||
|
|
|
@ -18,8 +18,11 @@ port = 9987
|
|||
|
||||
[positions]
|
||||
required = president,vice-president,sysadmin
|
||||
available = president,vice-president,treasurer,secretary,
|
||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
||||
available = president,vice-president,sysadmin,treasurer,
|
||||
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||
marketing-lead,design-lead,events-lead,reps-lead,
|
||||
mods-lead,photography-lead,codey-bot-lead,other
|
||||
|
||||
|
||||
[mysql]
|
||||
host = caffeine
|
||||
|
|
|
@ -63,8 +63,10 @@ exec = exec,exec-moderators
|
|||
|
||||
[positions]
|
||||
required = president,vice-president,sysadmin
|
||||
available = president,vice-president,treasurer,secretary,
|
||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
||||
available = president,vice-president,sysadmin,treasurer,
|
||||
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||
marketing-lead,design-lead,events-lead,reps-lead,
|
||||
mods-lead,photography-lead,codey-bot-lead,other
|
||||
|
||||
[mysql]
|
||||
# This is only used on the database_host.
|
||||
|
|
|
@ -39,16 +39,23 @@ def test_positions(cli_setup, g_admin_ctx):
|
|||
assert result.exit_code == 0
|
||||
assert result.output == '''
|
||||
The positions will be updated:
|
||||
president: test_0
|
||||
vice-president: test_1
|
||||
sysadmin: test_2
|
||||
secretary: test_3
|
||||
webmaster: test_4
|
||||
president: test_0
|
||||
vice-president: test_1
|
||||
sysadmin: test_2
|
||||
secretary: test_3
|
||||
webmaster: test_4
|
||||
treasurer:
|
||||
cro:
|
||||
librarian:
|
||||
imapd:
|
||||
offsck:
|
||||
ext-affairs-lead:
|
||||
marketing-lead:
|
||||
design-lead:
|
||||
events-lead:
|
||||
reps-lead:
|
||||
mods-lead:
|
||||
photography-lead:
|
||||
codey-bot-lead:
|
||||
other:
|
||||
Do you want to continue? [y/N]: y
|
||||
Update positions in LDAP... Done
|
||||
Update executive group in LDAP... Done
|
||||
|
@ -108,16 +115,23 @@ def test_positions_multiple_users(cli_setup, g_admin_ctx):
|
|||
assert result.exit_code == 0
|
||||
assert result.output == '''
|
||||
The positions will be updated:
|
||||
president: test_0
|
||||
vice-president: test_1, test_2
|
||||
sysadmin: test_2
|
||||
secretary: test_3, test_4, test_2
|
||||
president: test_0
|
||||
vice-president: test_1, test_2
|
||||
sysadmin: test_2
|
||||
secretary: test_3, test_4, test_2
|
||||
treasurer:
|
||||
cro:
|
||||
librarian:
|
||||
imapd:
|
||||
webmaster:
|
||||
offsck:
|
||||
ext-affairs-lead:
|
||||
marketing-lead:
|
||||
design-lead:
|
||||
events-lead:
|
||||
reps-lead:
|
||||
mods-lead:
|
||||
photography-lead:
|
||||
codey-bot-lead:
|
||||
other:
|
||||
Do you want to continue? [y/N]: y
|
||||
Update positions in LDAP... Done
|
||||
Update executive group in LDAP... Done
|
||||
|
|
|
@ -14,8 +14,10 @@ port = 9987
|
|||
|
||||
[positions]
|
||||
required = president,vice-president,sysadmin
|
||||
available = president,vice-president,treasurer,secretary,
|
||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
||||
available = president,vice-president,sysadmin,treasurer,
|
||||
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||
marketing-lead,design-lead,events-lead,reps-lead,
|
||||
mods-lead,photography-lead,codey-bot-lead,other
|
||||
|
||||
[mysql]
|
||||
host = coffee
|
||||
|
|
|
@ -99,6 +99,28 @@ def test_set_positions(cfg, client, g_admin_ctx, mock_mailman_server):
|
|||
'vice-president': ['test2', 'test3'],
|
||||
'sysadmin': ['test2', 'test3', 'test4'],
|
||||
}}
|
||||
# check every single psition
|
||||
status, data = client.post('/api/positions', json={
|
||||
'president': 'test1',
|
||||
'vice-president': 'test1',
|
||||
'treasurer': 'test1',
|
||||
'secretary': 'test1',
|
||||
'sysadmin': 'test1',
|
||||
'cro': 'test1',
|
||||
'webmaster': 'test1',
|
||||
'offsck': 'test1',
|
||||
'ext-affairs-lead': 'test1',
|
||||
'marketing-lead': 'test1',
|
||||
'design-lead': 'test1',
|
||||
'events-lead': 'test1',
|
||||
'reps-lead': 'test1',
|
||||
'mods-lead': 'test1',
|
||||
'photography-lead': 'test1',
|
||||
'codey-bot-lead': 'test1',
|
||||
'other': 'test1',
|
||||
})
|
||||
assert status == 200
|
||||
assert data[-1]['status'] == 'completed'
|
||||
finally:
|
||||
with g_admin_ctx():
|
||||
for user in users:
|
||||
|
|
|
@ -59,8 +59,10 @@ exec = exec
|
|||
|
||||
[positions]
|
||||
required = president,vice-president,sysadmin
|
||||
available = president,vice-president,treasurer,secretary,
|
||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
||||
available = president,vice-president,sysadmin,treasurer,
|
||||
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||
marketing-lead,design-lead,events-lead,reps-lead,
|
||||
mods-lead,photography-lead,codey-bot-lead,other
|
||||
|
||||
[mysql]
|
||||
username = mysql
|
||||
|
|
|
@ -58,8 +58,10 @@ exec = exec
|
|||
|
||||
[positions]
|
||||
required = president,vice-president,sysadmin
|
||||
available = president,vice-president,treasurer,secretary,
|
||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
||||
available = president,vice-president,sysadmin,treasurer,
|
||||
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||
marketing-lead,design-lead,events-lead,reps-lead,
|
||||
mods-lead,photography-lead,codey-bot-lead,other
|
||||
|
||||
[mysql]
|
||||
username = mysql
|
||||
|
|
Loading…
Reference in New Issue