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

Refactor integration tests to allow execution in real vCenter #29

Merged
merged 9 commits into from
Jun 18, 2024

Conversation

elsapassaro
Copy link
Collaborator

@elsapassaro elsapassaro commented May 27, 2024

SUMMARY
  • Adding default variables in integration targets in order to run integration tests on real vCenter instance.
  • Adding setup and teardown steps when needed
  • Renaming integration targets that will run also in Jenkins CI - adding the vmware_ prefix
ISSUE TYPE
  • Integration Tests Pull Request
ADDITIONAL INFORMATION

See ACA-1511

@elsapassaro elsapassaro force-pushed the test_eco_vcenter branch 3 times, most recently from 885b50a to d159c2f Compare May 27, 2024 15:09
@mariolenz
Copy link
Collaborator

OT but do you think there's a chance to use this "real vCenter instance" CI for community.vmware and vmware.vmware_rest, too?

Ref: ansible-collections/community.vmware#1746

Copy link
Collaborator

@bardielle bardielle left a comment

Choose a reason for hiding this comment

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

LGTM
@shellymiron please review it as well

@elsapassaro elsapassaro force-pushed the test_eco_vcenter branch 2 times, most recently from 6fea6d2 to eaffa98 Compare May 28, 2024 10:49
@shellymiron
Copy link
Collaborator

OT but do you think there's a chance to use this "real vCenter instance" CI for community.vmware and vmware.vmware_rest, too?

Ref: ansible-collections/community.vmware#1746

Hey Mario :) we will have a discussion about it tomorrow and we will keep this PR updated with what was decided

@elsapassaro elsapassaro force-pushed the test_eco_vcenter branch 9 times, most recently from 5b3c873 to 8470734 Compare May 29, 2024 14:28
@shellymiron
Copy link
Collaborator

@mariolenz hey!
we had a discussion about integrating the real vcenter CI within the community repo, and our thoughts is that it will be hard to control which PRs will be destructive for that env, since it serves multiple teams in redhat.
regarding the vmware_rest repo, we will want to have it running on the real env, but this is a low priority for now, since it has a lot more features and we are only 2 QEs :)
With that thoughts in mind, we would like to hear your opinion and if it is necessary/critical to have such job in the community

@mariolenz
Copy link
Collaborator

With that thoughts in mind, we would like to hear your opinion and if it is necessary/critical to have such job in the community

@shellymiron Probably not. But integration tests for community.vmware are still run with vCenter and ESXi 7.0 U3. It's really about time to start running those with a more current version. Latest release is 8.0 U3 and I think 7.0 will be EOL next(?) year.

That said, I'm not unhappy with Zuul. It mostly works. But I understood that you don't want to work on those integration tests because of lacking the time / knowledge / experience / whatever to do this.

I think it's both critical and necessary to run integration tests with a more current vSphere version, preferably 8.0 U3. And instead of trying to find someone who can update the Zuul integration tests accordingly or help me with yet another solution, I thought it would be the best thing if I could just re-use your solution.

@shellymiron
Copy link
Collaborator

shellymiron commented May 30, 2024

@mariolenz I see, so the main issue is with the vsphere version
yeah unfortunately we have zero knowledge with zuul, we will try to see if we can integrate our vcenter
in the community without making it destructive to the env
maybe with a manual trigger like /run-on-vcenter or something

@shellymiron
Copy link
Collaborator

LGTM
looks good :)

@elsapassaro elsapassaro force-pushed the test_eco_vcenter branch 4 times, most recently from 1b77b92 to 0025b12 Compare June 6, 2024 09:52
@elsapassaro elsapassaro force-pushed the test_eco_vcenter branch 4 times, most recently from 8d137fb to 3a88e69 Compare June 6, 2024 10:37
@@ -0,0 +1,2 @@
vcenter_port: 443
Copy link
Collaborator

Choose a reason for hiding this comment

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

vcenter_port: 1080

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the variables in defaults/main.yml should be used for eco vcenter and they are overwritten by variable in vars.yml when the role is imported from run.yml playbook.

It looks like in the execution the port it's using is indeed 1080 but it fails:

TASK [vmware_appliance_info : Gather appliance info] ***************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to connect to vCenter or ESXi API at 127.0.0.1:1080 : 404 Client Error: Not Found for url: https://127.0.0.1:1080/api"}

@bardielle bardielle merged commit 50c86e7 into ansible-collections:main Jun 18, 2024
9 checks passed
@elsapassaro elsapassaro deleted the test_eco_vcenter branch June 18, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants