Bug 34549 - Test CLI tool import_user
Test CLI tool import_user
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2 Errata
Assigned To: Sönke Schwardt-Krummrich
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-15 10:03 CEST by Sönke Schwardt-Krummrich
Modified: 2014-08-27 17:01 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2014-04-15 10:03:25 CEST
For refactoring the CLI tool "import_user" all functions should be tested via ucs-test. Currently the tool uses it's own implementation (which shall be used as reference!).

The upcoming UCS@school import library will provide the same functionality as the import CLI tools and will be used within the CLI tools in near future.

Ideally the test script is able to test the CLI tool as well as the import lib.
Comment 1 Stefan Gohmann univentionstaff 2014-05-10 00:22:09 CEST
I've added a first version. r50111

Theses issues are still missing:
 - hook support
 - sambahome check
 - profilepath check

Questions:
 - Is a rename of an user via import possible?
 - Do we need tests for 
     'self.rights    = parsed[6] # users which may change this entry'
 - What about multi schools for one user?
Comment 2 Stefan Gohmann univentionstaff 2014-05-10 17:11:52 CEST
(In reply to Stefan Gohmann from comment #1)
>  - hook support

Hook support has been added: r50113
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2014-05-12 09:27:56 CEST
(In reply to Stefan Gohmann from comment #1)
>  - Is a rename of an user via import possible?

No. Not possible.

>  - Do we need tests for 
>      'self.rights    = parsed[6] # users which may change this entry'

No. Unused.

>  - What about multi schools for one user?

Currently not possible.
Comment 4 Stefan Gohmann univentionstaff 2014-05-13 21:43:43 CEST
(In reply to Stefan Gohmann from comment #1)
>  - sambahome check
>  - profilepath check

Done: r50158 + r50160
Comment 5 Florian Best univentionstaff 2014-08-21 08:22:39 CEST
221 »   def get_profile_path_server(self):
222 »   »   if configRegistry.get('ucsschool/import/set/serverprofile/path'):
223 »   »   »   print 'get_profile_path_server: UCR variable ucsschool/import/set/serverprofile/path is set'
224 »   »   »   return configRegistry.get('samba_home_path_server')

REOPEN: the return value is wrong.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2014-08-21 16:18:20 CEST
(In reply to Florian Best from comment #5)
> 221 »   def get_profile_path_server(self):
> 222 »   »   if configRegistry.get('ucsschool/import/set/serverprofile/path'):
> 223 »   »   »   print 'get_profile_path_server: UCR variable
> ucsschool/import/set/serverprofile/path is set'
> 224 »   »   »   return configRegistry.get('samba_home_path_server')
> 
> REOPEN: the return value is wrong.

r52915 | Bug #34549: fixed wrong UCR variable name
ucs-test-ucsschool (1.0.76-1) unstable; urgency=low
Comment 7 Florian Best univentionstaff 2014-08-22 09:02:05 CEST
OK
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-08-27 17:01:39 CEST
UCS@school 3.2 R2 v2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2v2-de.html

If this error occurs again, please use "Clone This Bug".