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

[Draft] [DNM] Object Storage #1523

Closed
wants to merge 10 commits into from

Conversation

m-ildefons
Copy link

Tests for the object store controller in the Longhorn manager.

Related: longhorn/longhorn-manager#2136
Related: longhorn/longhorn#6640

LEP: longhorn/longhorn#5832

Add test skeleton for object endpoint creation/deletion tests for the
manager / object endpoint controller

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Add first tests and fixtures for the object endpoint controller.

There are two fixtures for testing the object endpoint controller:
A storage class and an object endpoint.
Although there is nothing special about the storage class, it is there
as a fixture since it needs to be ensured a known storage class exists
to be able to create an object endpoint.
The object endpoint exists as fixture, because this makes creation and
deletion easier, ensuring that even in the event of a failed test the
object endpoint is cleaned up.

In the object endpoint creation test, several assertions are made on
the resources connected to the object endpoint to ensure creation was
successful and the resulting object endpoint works as expected.

In the object endpoint deletion test, an object endpoint is created, but
then it is explicitly deleted. After that, several assertions are made
to ensure no resources are left behind.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Cleanup code, fix linter warnings, add comments

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Test the controlled creation of a longhorn volume and PV

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Assert that when running the object endpoint's status will be updated
with the endpoind address.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
- Adjust to ObjectStore CRD
- Rename test suite for object store controller

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Fix cluster role and run all tests by default

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
@mergify
Copy link

mergify bot commented Sep 14, 2023

This pull request is now in conflicts. Could you fix it @m-ildefons? 🙏

- Change ObjectStore manifest and API calls to be namespaced,
  corresponding to the change in the CRD
- Replace clear-text credentials in the ObjectStore manifest with a
  SecretRef and add a secret-fixture to let pytest handle the creation
  and deletion of the referenced secret

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Fix expected .status.state: Running -> running

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
- Fix naming of volume/PV
- Fix secret creation
- Fix s3 smoke test using the right credentials

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
@m-ildefons m-ildefons closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant