-
Notifications
You must be signed in to change notification settings - Fork 27
Add first Longhorn tests #389
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
base: main
Are you sure you want to change the base?
Conversation
c8c01b3 to
0cda9b4
Compare
| // If Longhorn was installed by a previous test on this same session, uninstall it to install it again with custom configuration. | ||
| // If Longhorn was installed previously to this test run, leave it be and skip this test. This way we allow for running the | ||
| // next tests on top of a manually installed Longhorn and avoid accidentally uninstalling something important. | ||
| if chart.IsAlreadyInstalled { | ||
| if l.installedLonghorn { | ||
| l.T().Log("Uninstalling Longhorn that was intalled on the previous test.") | ||
| err = charts.UninstallLonghornChart(l.client, longhornNamespace, l.cluster.ID, l.payloadOpts.Host) | ||
| require.NoError(l.T(), err) | ||
| } else { | ||
| l.T().Skip("Skipping installation test because Longhorn is already installed") | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This decision was tricky and had some discussion surrounding it. From the outcome of the discussions I believe this is the way to go. This way we achieve
1- Running all tests at once with the suite;
2- Running some tests with a custom installation of longhorn;
3- Keep the cleanup logic neatly isolated;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @rancher/qa-pit-crew
264b9a2 to
b1dbeaa
Compare
rancher-max
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! Couple of minor things, but otherwise this has my approval 👍
floatingman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. You should consider adding a README for the longhorn_test, so others will know how to run the tests and if any specific cattle-config settings are needed.
b1dbeaa to
e7d7e69
Compare
e7d7e69 to
0ebe37f
Compare
rancher-max
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- left one comment that I feel is a nit so will leave up to you if you want to update or not
@floatingman at this point there is no additional settings required for these tests, so I don't think this is needed yet. That said, there are a lot more tests to go so I will keep that in mind moving forward. |
bc06906 to
978e0eb
Compare
978e0eb to
0a11914
Compare
Signed-off-by: hamistao <[email protected]>
This is not required for the Longhorn tests. Signed-off-by: hamistao <[email protected]>
The dash is already added by `AppendRandomString` Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
And move CreatePVCWorkload there Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
This adds the following tests: - Install Longhorn Using Rancher Charts - Install Longhorn with Custom Configuration - Create Longhorn Volume with Rancher Workloads - Test RBAC Integration with Longhorn - Test Scaling a StatefulSet with a Longhorn PVC Signed-off-by: hamistao <[email protected]>
0a11914 to
aa8f72c
Compare
rancher/qa-tasks#2006
This adds the first automated Longhorn interoperability tests, namely: