Compare commits

...

2 Commits

Author SHA1 Message Date
Nathan Chung 80ec0bac6b
tests: update assertions for new positions
Signed-off-by: n4chung <n4chung@csclub.uwaterloo.ca>
2022-10-13 18:12:22 -04:00
Nathan Chung c2a5220b38
add new positions (#63)
Added the following positions:
* ext affairs lead
* marketing lead
* design lead
* events lead
* reps lead
* mods lead
* photography lead
* other

Signed-off-by: n4chung <n4chung@csclub.uwaterloo.ca>
2022-10-12 21:59:30 -04:00
8 changed files with 45 additions and 15 deletions

View File

@ -9,4 +9,12 @@ position_names = {
'imapd': "IMAPD", 'imapd': "IMAPD",
'webmaster': "Web Master", 'webmaster': "Web Master",
'offsck': "Office Manager", 'offsck': "Office Manager",
'ext-affairs-lead': "External Affairs Lead",
'marketing-lead': "Marketing Lead",
'design-lead': "Design Lead",
'events-lead': "Events Lead",
'reps-lead': "Reps Lead",
'mods-lead': "Mods Lead",
'photography-lead': "Photography Lead",
'other': "Other",
} }

View File

@ -19,7 +19,9 @@ port = 9987
[positions] [positions]
required = president,vice-president,sysadmin required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary, available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql] [mysql]
host = caffeine host = caffeine

View File

@ -64,7 +64,9 @@ exec = exec,exec-moderators
[positions] [positions]
required = president,vice-president,sysadmin required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary, available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql] [mysql]
# This is only used on the database_host. # This is only used on the database_host.

View File

@ -39,16 +39,24 @@ def test_positions(cli_setup, g_admin_ctx):
assert result.exit_code == 0 assert result.exit_code == 0
assert result.output == ''' assert result.output == '''
The positions will be updated: The positions will be updated:
president: test_0 president: test_0
vice-president: test_1 vice-president: test_1
sysadmin: test_2 sysadmin: test_2
secretary: test_3 secretary: test_3
webmaster: test_4 webmaster: test_4
treasurer: treasurer:
cro: cro:
librarian: librarian:
imapd: imapd:
offsck: offsck:
ext-affairs-lead:
marketing-lead:
design-lead:
events-lead:
reps-lead:
mods-lead:
photography-lead:
other:
Do you want to continue? [y/N]: y Do you want to continue? [y/N]: y
Update positions in LDAP... Done Update positions in LDAP... Done
Update executive group in LDAP... Done Update executive group in LDAP... Done

View File

@ -15,7 +15,9 @@ port = 9987
[positions] [positions]
required = president,vice-president,sysadmin required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary, available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql] [mysql]
host = coffee host = coffee

View File

@ -8,7 +8,11 @@ def test_get_positions(client, ldap_user, g_admin_ctx):
assert status == 200 assert status == 200
expected = { expected = {
'president': ldap_user.uid, 'president': ldap_user.uid,
'secretary': 'test_3',
'sysadmin': 'test_2',
'treasurer': ldap_user.uid, 'treasurer': ldap_user.uid,
'vice-president': 'test_1',
'webmaster': 'test_4',
} }
assert data == expected assert data == expected

View File

@ -60,7 +60,9 @@ exec = exec
[positions] [positions]
required = president,vice-president,sysadmin required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary, available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql] [mysql]
username = mysql username = mysql

View File

@ -59,7 +59,9 @@ exec = exec
[positions] [positions]
required = president,vice-president,sysadmin required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary, available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql] [mysql]
username = mysql username = mysql