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

Add org users to govcd test configuration #515

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

dataclouder
Copy link
Contributor

@dataclouder dataclouder commented Nov 1, 2022

A new structure []tenant is added to TestConfig, to allow connecting as tenant user.
When the option -vcd-test-org-user (same as what is used in terraform-provider-vcd) is se, the first tenant in the list is selected for connection.
To use the second tenant (or an optional third one), we can use the option -vcd-connect-tenant=1 (or -vcd-connect-tenant=2 if a third one exists).

A new structure `[]tenants` is added to `TestConfig`, to allow
connecting as tenant user.
When the option `-vcd-test-org-user` (same as what is used in
terraform-provider-vcd) is se, the first tenant in the list is
selected for connection.
To use the second tenant (or an optional third one), we can
use the option `-vcd-connect-tenant=1` (or `-vcd-connect-tenant=2` if a
third one exists).

Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
@dataclouder dataclouder marked this pull request as ready for review November 1, 2022 19:44
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.

Just a reminder - we also have "on the fly" option for getting a client with Org user connection - func newOrgUserConnection

@dataclouder
Copy link
Contributor Author

Just a reminder - we also have "on the fly" option for getting a client with Org user connection - func newOrgUserConnection

Yes. I remember. This change, however, allows existing tests to run as Org user. We will need to add appropriate skip statements if a test is supposed to be used blindly by both admin and org users.
So far, we can target individual tests to run as org user, which is useful during development

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.

Looks great!

@dataclouder dataclouder merged commit 017338b into vmware:main Nov 7, 2022
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.

5 participants