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

tests for opensearch webhook were implemented #691

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

tengu-alt
Copy link
Collaborator

No description provided.

@tengu-alt tengu-alt added test Сover the code with tests refactor Code improvements or refactorings labels Jan 29, 2024
@tengu-alt tengu-alt self-assigned this Jan 29, 2024
@tengu-alt tengu-alt linked an issue Jan 29, 2024 that may be closed by this pull request
@tengu-alt tengu-alt force-pushed the opensearch-webhook-tests branch 4 times, most recently from 06204ec to b67d0f8 Compare January 31, 2024 12:47
Comment on lines +224 to +226
if *old[0] != *new[0] {
return models.ErrImmutableIngestNodes
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we validate that only 1 or fewer items can be appended to the IngestNodes array while creation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, we have a kubebuilder annotation that sets maxItems

Comment on lines +236 to +237
if *old[0] != *new[0] {
return models.ErrImmutableClusterManagedNodes
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same is here


ctx := context.Background()

When("apply a OpenSearch manifest", func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

an Opensearch

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment on lines +64 to +67
prevStringValue := openSearchManifest.Spec.DataCentres[0].ProviderAccountName
testOpenSearchManifest.Spec.DataCentres[0].ProviderAccountName = models.DefaultAccountName
Expect(k8sClient.Create(ctx, &testOpenSearchManifest)).ShouldNot(Succeed())
testOpenSearchManifest.Spec.DataCentres[0].ProviderAccountName = prevStringValue
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we plan to add tests for RIYOA accounts?

RIYOA - run in your own account. It means, that customer will run Instaclustr Products using their own AWS/AZURE/GCP accounts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this test case is made for ensure that cloudProviderSettings is available only for RIYOA accounts

@testisnullus testisnullus merged commit bdde83c into main Feb 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code improvements or refactorings test Сover the code with tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test OpenSearch cluster resource
4 participants