Skip to content

NC | lifecycle | Add Tests in POSIX Integration Tests - Part 1 #8990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Apr 27, 2025

Describe the Problem

We want to expand our test coverage in the NC lifecycle test.

Explain the Changes

  1. Create an enum for the status for easier reuse.
  2. Fix the description mismatch (id) in the rule lifecycle_rule_delete_all.
  3. Rename the file: remove the suffix cli and replace it with posix_integration, also inside the test titles, remove the cli and replace it with nc.
  4. Separate with additional describe parts.
  5. Remove the test "abort mpu by tags" as according to the docs:

When you use the ExpiredObjectDeleteMarker S3 Lifecycle action, the rule cannot specify a tag-based filter.

Note: We added a validation for this - see issue #8870

  1. Add cases where the status is Disabled and the rule doesn't run (in partially picked cases).
  2. In versioning:
  • DISABLED, add the test cases for nested key and content dir
  • ENABLED only for nested key (as content dir is an unsupported case - see our design doc of versioning).
    using Jest feature it.each (see Jest docs - we used array of objects and in the title we used the placeholder of $description to add information in the title).
    Note: The tests were picked (we didn't want to run them on all the existing tests, although we can).
  1. Add a warning to the JSDoc function update_file_mtime.
  2. Format document.
  3. Add the name test in our docs with a short explanation.

Issues:

  1. GAPS - we still have more tests that we plan to add to improve our coverage.

Testing Instructions:

Automatic Tests

  1. Please run: sudo npx jest test_nc_lifecycle_posix_integration.test
  • Doc added/updated
  • Tests added

@shirady shirady self-assigned this Apr 27, 2025
@shirady shirady requested review from nadavMiz and romayalon April 27, 2025 07:13
Copy link
Contributor

@nadavMiz nadavMiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comment

@shirady shirady force-pushed the nc-nsfs-lifecycle-tests branch from 4749e75 to cda59e5 Compare April 27, 2025 09:45
@shirady shirady merged commit 44d6518 into noobaa:master Apr 27, 2025
11 checks passed
@shirady shirady deleted the nc-nsfs-lifecycle-tests branch April 27, 2025 10:31
@shirady shirady changed the title NC | lifecycle | Add Tests in POSIX Integration Tests NC | lifecycle | Add Tests in POSIX Integration Tests - Part 1 Apr 30, 2025
@romayalon romayalon mentioned this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants