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

Catalog and LDAP tests fix #458

Merged
merged 5 commits into from
Apr 6, 2022
Merged

Catalog and LDAP tests fix #458

merged 5 commits into from
Apr 6, 2022

Conversation

mikeletux
Copy link
Contributor

@mikeletux mikeletux commented Apr 4, 2022

This PR is not associated with any issue.

Description

Fix issues with Catalog tests, as well as LDAP test framework.

Detailed description

This PR addresses two issues that were impacting tests.

Issues solved related Catalog

There were some Catalog tests that were not removing the CatalogItems being upload to Catalogs. These tests were leveraging the function AddToCleanupList to delete those CatalogItems. This was leading to issues because the clean-up function is executed at the end of the test framework, and other tests might not be aware about the changes being done there.
The fix introduced here is to make every tests responsible of cleaning up whatever it has uploaded to Catalogs after the testing part has been done and right before the test returns. Hence, the AddToCleanupList function lays as last resort for cleaning-up the environment at the end of the tests if something fails.

Issues solved related LDAP

Turns out that when configuring LDAP settings, for whatever reason, two Org catalog publishing vars gets disable (these are Publish external catalogs and Subscribe to external catalogs). This is a know issue and VCD team is addressing it to be solved. This interference with more tests as it makes the environment non-consistent.
In the meantime, this workaround what it does is, before doing any configuration, it grabs those two values, and when all LDAP testing sub-framework is closing up, is sets those vars again to the Org and finishes.

Tested and working in VCD 10.2.2 and 10.3.2

Miguel Sama added 3 commits April 4, 2022 10:23
…o VCD

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux self-assigned this Apr 4, 2022
…the Org catalog publishing bug

Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux marked this pull request as ready for review April 4, 2022 13:53
@mikeletux
Copy link
Contributor Author

Not sure if I should include changelog for this @lvirbalas @Didainius @vbauzysvmware @adambarreiro @datacharmer

Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot!

Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

Thanks - I have ran catalog test twice and it worked and also didn't clear down catalog publishing settings at Org level.

@lvirbalas
Copy link
Collaborator

Not sure if I should include changelog for this @lvirbalas @Didainius @vbauzysvmware @adambarreiro @datacharmer

Yes, please. As this is purely testing, you can add to the IMPROVEMENTS section. LGTM, otherwise :)

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

(Just a changelog entry is needed.)

@Didainius Didainius removed the request for review from dataclouder April 5, 2022 12:30
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux merged commit f78abc0 into vmware:main Apr 6, 2022
@mikeletux mikeletux deleted the tests-fix branch April 6, 2022 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants