Description Write (port tests from TET) import test suite. Put the tests to suites/import/import_test.py
Adding bugzilla test cases for https://bugzilla.redhat.com/show_bug.cgi?id=1463204.
<img alt="0001-CI-test-import-bugzilla-test-cases.patch" src="/389-ds-base/issue/raw/files/5ac53980c9d3b3c5292119f50aaad16785290583339f76981ff74ecac4b5dea8-0001-CI-test-import-bugzilla-test-cases.patch" />
Metadata Update from @sramling: - Custom field component adjusted to None - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None - Custom field type adjusted to None - Custom field version adjusted to None
Metadata Update from @sramling: - Issue assigned to sramling
Metadata Update from @sramling: - Custom field component adjusted to CI test - suites (was: None) - Custom field origin adjusted to QE (was: None) - Custom field reviewstatus adjusted to review (was: None) - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1463204 - Custom field type adjusted to task (was: None) - Custom field version adjusted to 1.3.6 (was: None) - Issue priority set to: normal - Issue set to the milestone: CI test 1.0
Minor issue, this script is in the suites directory, and it uses a name that indicates it tests the import feature, however, this test is only checking a particular bug. So I feel it should go into the /tickets directory.
Or, keep it in the /suites directory, but use a different name for the script. Some name that indicates it's testing unusual scenarios/bugs. Then we can add other "unique" tests to the script in the future.
I just think we should reserve the name "import_test.py" for the "standard" import tests, and not for single bugs.
Perhaps I'm being premature, and you have plans to expand on import_test.py. Thoughts?
@sramling regarding test case: I think it is better to leave a bugzilla link in the pagure only, not in the docstring.
Please, don't forget to use os.path.join:
ldif_file = ldif_dir + '/suffix_del1.ldif'
Use MappingTrees object for mapping tree operation. Legacy will be removed one day.
mapping_tree = 'cn="{}",cn=mapping tree,cn=config'.format(TEST_SUFFIX1) topo.standalone.delete_s(mapping_tree)
In the docstring - "no server hang" - I think for the right grammar it should be "the server should not hang" or something like that.
Use just topo.standalone.restart(timeout=10) without any 'assert' or 'if not'. And we will fix that part in lib389 later. I think it should use restart-dirsrv wrapper.
@mreynolds I agree. I think it is better to divide the bugzilla special cases from the basic cases. Also, @vashirov proposed to use pytest.marks, so we can run the tests for regressions only. I agree with that too. As an alternative, we can have the next structure and run 'py.test -k regression ./'
suites/import/basic_test.py suites/import/regression_test.py suites/replication/basic_test.py suites/replication/cleanallruv_test.py suites/replication/regression_test.py etc.
Minor issue, this script is in the suites directory, and it uses a name that indicates it tests the import feature, however, this test is only checking a particular bug. So I feel it should go into the /tickets directory. Or, keep it in the /suites directory, but use a different name for the script. Some name that indicates it's testing unusual scenarios/bugs. Then we can add other "unique" tests to the script in the future. I just think we should reserve the name "import_test.py" for the "standard" import tests, and not for single bugs. Perhaps I'm being premature, and you have plans to expand on import_test.py. Thoughts? The plan is to port all the import tests from TET to Pytest.
Personally I feel we should break up the tests into different files. One for core import tests, (import_test.py), and ones for different types of tests as previously mentioned by Simon.
Breaking up the tests into different scripts also makes things easier in some regards, because using one file for every test means that some tests might also need to "reset" the server before the next test function runs.
@mreynolds and @spichugi , thanks for your input. It makes sense to split the tests into different scripts. Here is my new patch...
<img alt="0001-CI-test-import-bugzilla-test-cases.patch" src="/389-ds-base/issue/raw/files/a283fde5d46a84d5740c505def3ca0c1f5d90ff3e45ab152bbe664cdb982f549-0001-CI-test-import-bugzilla-test-cases.patch" />
Adding new patch
<img alt="0001-CI-test-import-bugzilla-test-cases.patch" src="/389-ds-base/issue/raw/files/a487148f99a0d0d562fe408d6ec14f6e2952ffa8122e8d40ead9e14258f9bff2-0001-CI-test-import-bugzilla-test-cases.patch" />
Adding new patch with fixes in commit message
<img alt="0001-CI-test-import-bugzilla-test-cases.patch" src="/389-ds-base/issue/raw/files/24b19f4e3af39329fa9c53a67a9cb096e6a8bd536561b261bedb77d642cae179-0001-CI-test-import-bugzilla-test-cases.patch" />
While pushing, I've added one more line after a restart operation.
assert not topo.standalone.detectDisorderlyShutdown()
commit ab2ea37 Author: Sankar Ramalingam sramling@redhat.com Date: Thu Aug 3 13:05:56 2017 +0530
Metadata Update from @sramling: - Custom field reviewstatus adjusted to None (was: review)
Metadata Update from @mreynolds: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2396
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Log in to comment on this ticket.