-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
Non ContainerizedNon containerizedNon containerized
Milestone
Description
Environment info
- NooBaa Version: 5.17
- Platform: NC
Unit tests refactoring ideas
- 1. CLI validations unit tests - as mentioned in NC | Health fix cli arguments validation and some small fixes #8052 (comment) - currently CLI validations unit tests are scattered in different files, we should have a single unit test file for CLI argument validations.
- 2. test_bucketspace.js should be renamed to test_nsfs_integrations.js test_s3_on_nsfs_flow.js or something similar as it is not actually a unit test file but it provides integration tests - will be fixed by NC | NSFS | Add
stat
tobucket_namespace_cache
#8527 - 3. Full RPM/Linux flow tests - install, upgrade, health, syslog.
- 4. Metrics tests.
- 5. Add more existing s3 tests to nc_index.js (currently commented).
- 6. S3 concurrency tests - bucket/objects scale 1000. Concurrent ops example for buckets: create, list, delete.
- 7. CLI concurrency tests - bucket/account scale 1000. Concurrent ops example for buckets: create, list, delete, health.
- 8. Remove duplicate code - like exec_manage_cli() and other functions used by mocha/jest i different ways.
- 9. Add tests to every function in configFS.
- 10. Move variables name of constant to a place where we can reuse them in
test_utils
for example:noobaa-core/src/test/system_tests/test_utils.js
Lines 589 to 593 in 30ac4b2
const buckets_dir_name = '/buckets/'; const identities_dir_name = '/identities/'; const accounts_by_name = '/accounts_by_name/'; const access_keys_dir_name = '/access_keys/'; const system_json = '/system.json'; - 11. Move the
fail
function that we have copies in many files to one place and reuse it, for example:noobaa-core/src/test/unit_tests/jest_tests/test_nc_nsfs_account_schema_validation.test.js
Lines 525 to 530 in 30ac4b2
// Jest has builtin function fail that based on Jasmine // in case Jasmine would get removed from jest, created this one // based on this: https://stackoverflow.com/a/55526098/16571658 function fail(reason) { throw new Error(reason); } - 12. Rename the file
test_nc_nsfs_bucket_cli.test.js
totest_nc_bucket_cli.test.js
(notice that we also have the filetest_nc_nsfs_account_cli.test.js
and we also need to update theCI&Tests.md
) - will be fixed by NC | Test Files | Removensfs
From File Name and Update Docs #8780. - 13. Events tests
Metadata
Metadata
Assignees
Labels
Non ContainerizedNon containerizedNon containerized