Skip to content
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

Test backup consistency command in ci #9286

Closed
kobergj opened this issue May 31, 2024 · 2 comments
Closed

Test backup consistency command in ci #9286

kobergj opened this issue May 31, 2024 · 2 comments
Assignees

Comments

@kobergj
Copy link
Collaborator

kobergj commented May 31, 2024

We would like to test the new ocis backup consistency command in the ci. Since the implementation relies heavily on decomposedfs interns it is likely that it will break if there are breaking changes to decomposedfs.

The straight forward implementation of such a test proved difficult. We need the complete ocis data structure which is only available in ocis server ci step. However this step is detached, therefore there is no chance to run the command after the tests are finished. Additionally ocis tests clean users after each run, which will delete their data also.

The new idea is to use the ocis wrapper to test this feature. This requires several changes:

  • add an endpoint to ocis wrapper to run a ocis command
  • add an endpoint to ocis wrapper to start/stop ocis (or do this as part of the above step)
  • write a test that stops ocis, runs the ocis backup consistency command and restarts ocis after.
  • this test should fail if there are inconsistencies
  • this test should NOT run as the first test in the suite

We would wait for the opinion of @ScharfViktor on this before we start implementing.

cc @butonic @dragonchaser

@dragonchaser dragonchaser changed the title Test backup command in ci Test backup consistency command in ci Jun 4, 2024
@saw-jan saw-jan added the QA:team label Jun 6, 2024
@saw-jan saw-jan added the QA:p2 label Jun 19, 2024
@nabim777 nabim777 self-assigned this Jun 21, 2024
@nabim777 nabim777 assigned ishabaral and unassigned nabim777 Jul 3, 2024
@saw-jan saw-jan self-assigned this Jul 5, 2024
@ishabaral ishabaral removed their assignment Jul 8, 2024
@saw-jan
Copy link
Member

saw-jan commented Jul 9, 2024

Necessary implementation and setup done #9546

@saw-jan
Copy link
Member

saw-jan commented Jul 11, 2024

We added a scenario to create some user data and do the backup consistency check.

Scenario: check backup consistency via CLI command
    Given these users have been created with default attributes and without skeleton files:
      | username |
      | Alice    |
      | Brian    |
      | Carol    |
    And user "Alice" has created folder "/uploadFolder"
    And user "Carol" has created folder "/uploadFolder"
    And user "Alice" has sent the following resource share invitation:
      | resource        | uploadFolder |
      | space           | Personal     |
      | sharee          | Brian        |
      | shareType       | user         |
      | permissionsRole | Editor       |
    And user "Carol" has deleted file "/uploadFolder"
    And the administrator has stopped the server
    When the administrator checks the backup consistency using the CLI
    Then the command should be successful
    And the command output should contain "💚 No inconsistency found. The backup in '%storage_path%' seems to be valid."

@kobergj if this is enough.

@saw-jan saw-jan closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants