Compare commits
6 Commits
master
...
new-positi
Author | SHA1 | Date |
---|---|---|
Leon | ac9a71437f | |
Leon Zhang | bd453990c9 | |
Leon | 82d375b7f4 | |
Leon | c9928c47e5 | |
Leon | c9ad827c8b | |
Leon | 067a559b5a |
|
@ -5,8 +5,14 @@ position_names = {
|
||||||
'secretary': "Secretary",
|
'secretary': "Secretary",
|
||||||
'sysadmin': "Sysadmin",
|
'sysadmin': "Sysadmin",
|
||||||
'cro': "Chief Returning Officer",
|
'cro': "Chief Returning Officer",
|
||||||
'librarian': "Librarian",
|
|
||||||
'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",
|
||||||
|
'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]
|
[positions]
|
||||||
required = president,vice-president,sysadmin
|
required = president,vice-president,sysadmin
|
||||||
available = president,vice-president,treasurer,secretary,
|
available = president,vice-president,sysadmin,treasurer,
|
||||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||||
|
marketing-lead,design-lead,events-lead,reps-lead,
|
||||||
|
mods-lead,photography-lead,codey-bot-lead,other
|
||||||
|
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
host = caffeine
|
host = caffeine
|
||||||
|
|
|
@ -63,8 +63,10 @@ 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,sysadmin,treasurer,
|
||||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||||
|
marketing-lead,design-lead,events-lead,reps-lead,
|
||||||
|
mods-lead,photography-lead,codey-bot-lead,other
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
# This is only used on the database_host.
|
# 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.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:
|
|
||||||
imapd:
|
|
||||||
offsck:
|
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
|
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
|
||||||
|
@ -108,16 +115,23 @@ def test_positions_multiple_users(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, test_2
|
vice-president: test_1, test_2
|
||||||
sysadmin: test_2
|
sysadmin: test_2
|
||||||
secretary: test_3, test_4, test_2
|
secretary: test_3, test_4, test_2
|
||||||
treasurer:
|
treasurer:
|
||||||
cro:
|
cro:
|
||||||
librarian:
|
|
||||||
imapd:
|
|
||||||
webmaster:
|
webmaster:
|
||||||
offsck:
|
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
|
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
|
||||||
|
|
|
@ -14,8 +14,10 @@ port = 9987
|
||||||
|
|
||||||
[positions]
|
[positions]
|
||||||
required = president,vice-president,sysadmin
|
required = president,vice-president,sysadmin
|
||||||
available = president,vice-president,treasurer,secretary,
|
available = president,vice-president,sysadmin,treasurer,
|
||||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||||
|
marketing-lead,design-lead,events-lead,reps-lead,
|
||||||
|
mods-lead,photography-lead,codey-bot-lead,other
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
host = coffee
|
host = coffee
|
||||||
|
|
|
@ -99,6 +99,28 @@ def test_set_positions(cfg, client, g_admin_ctx, mock_mailman_server):
|
||||||
'vice-president': ['test2', 'test3'],
|
'vice-president': ['test2', 'test3'],
|
||||||
'sysadmin': ['test2', 'test3', 'test4'],
|
'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:
|
finally:
|
||||||
with g_admin_ctx():
|
with g_admin_ctx():
|
||||||
for user in users:
|
for user in users:
|
||||||
|
|
|
@ -59,8 +59,10 @@ exec = exec
|
||||||
|
|
||||||
[positions]
|
[positions]
|
||||||
required = president,vice-president,sysadmin
|
required = president,vice-president,sysadmin
|
||||||
available = president,vice-president,treasurer,secretary,
|
available = president,vice-president,sysadmin,treasurer,
|
||||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||||
|
marketing-lead,design-lead,events-lead,reps-lead,
|
||||||
|
mods-lead,photography-lead,codey-bot-lead,other
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
username = mysql
|
username = mysql
|
||||||
|
|
|
@ -58,8 +58,10 @@ exec = exec
|
||||||
|
|
||||||
[positions]
|
[positions]
|
||||||
required = president,vice-president,sysadmin
|
required = president,vice-president,sysadmin
|
||||||
available = president,vice-president,treasurer,secretary,
|
available = president,vice-president,sysadmin,treasurer,
|
||||||
sysadmin,cro,librarian,imapd,webmaster,offsck
|
secretary,cro,webmaster,offsck,ext-affairs-lead,
|
||||||
|
marketing-lead,design-lead,events-lead,reps-lead,
|
||||||
|
mods-lead,photography-lead,codey-bot-lead,other
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
username = mysql
|
username = mysql
|
||||||
|
|
Loading…
Reference in New Issue