community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

vmware: module without any functional test

Open Akasurde opened this issue 4 years ago • 9 comments

SUMMARY

The following modules don't have any test coverage:

  • [ ] vmware_category_info
  • [x] vmware_cfg_backup
  • [ ] vmware_cluster_vcls
  • [ ] vmware_content_deploy_ovf_template
  • [ ] vmware_deploy_ovf
  • [x] vmware_dns_config is deprecated, anyway
  • [ ] vmware_dvswitch_lacp
  • [x] vmware_guest_boot_manager
  • [ ] vmware_guest_file_operation
  • [ ] vmware_guest_tools_upgrade
  • [ ] vmware_guest_tpm
  • [ ] vmware_guest_vgpu
  • [ ] vmware_guest_video
  • [x] vmware_guest_vnc is deprecated, anyway
  • [ ] vmware_vm_shell
  • [ ] vmware_vm_vss_dvs_migrate
  • [ ] vmware_vsan_cluster

I use the following script to generate the list:

#!/bin/bash

vmware_modules=$(find ./lib/ansible/modules/cloud/vmware/ -name 'vmware_*.py' -exec basename -s .py {} \;)
for module in ${vmware_modules}; do
    if ! test -d ./test/integration/targets/${module}; then
        echo "- [ ] \`${module}\`"
    fi
done
ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware

ANSIBLE VERSION
devel

Akasurde avatar Mar 04 '20 12:03 Akasurde

@Tomorrow9 said -
Functional test for "vmware_export_ovf" module in PR #60265.

Akasurde avatar Mar 04 '20 12:03 Akasurde

Migrated from https://github.com/ansible/ansible/issues/59635

Akasurde avatar Mar 04 '20 12:03 Akasurde

cc @goneri

Akasurde avatar Mar 04 '20 12:03 Akasurde

There's PR #186 that will add an (initial) integration test for vmware_dvs_host.

mariolenz avatar May 27 '20 19:05 mariolenz

It looks like vmware_vmotion, vmware_category, vmware_tag_info and vmware_tag_manager do have integration tests meanwhile.

@Akasurde Can you please check this? And, if I'm right, tick them off in your list?

mariolenz avatar May 27 '20 20:05 mariolenz

@Akasurde

#!/bin/bash

vmware_modules=$(find ./lib/ansible/modules/cloud/vmware/ -name 'vmware_*.py' -exec basename -s .py {} \;)
for module in ${vmware_modules}; do
    if ! test -d ./test/integration/targets/${module}; then
        echo "- [ ] \`${module}\`"
    fi
done

We don't have a directory lib/ansible/modules/cloud/vmware/. Our modules are under plugins/modules/. I've changed your script a bit to work with this repo:

VMWARE_MODULES=$(find plugins/modules/ -name 'vmware_*.py' -exec basename -s .py {} \;)
for MODULE in ${VMWARE_MODULES}; do
    if ! test -d tests/integration/targets/$MODULE; then
        echo "$MODULE"
    fi
done | sort

And I get the following result:

- [ ] vmware_category_facts
- [ ] vmware_category_info
- [ ] vmware_cfg_backup
- [ ] vmware_content_deploy_ovf_template
- [ ] vmware_deploy_ovf
- [ ] vmware_dns_config
- [ ] vmware_dvswitch_lacp
- [ ] vmware_guest_boot_manager
- [ ] vmware_guest_file_operation
- [ ] vmware_guest_tools_upgrade
- [ ] vmware_guest_video
- [ ] vmware_guest_vnc
- [ ] vmware_host_lockdown
- [ ] vmware_object_role_permission
- [ ] vmware_tag_facts
- [ ] vmware_vm_shell
- [ ] vmware_vm_vss_dvs_migrate
- [ ] vmware_vsan_cluster

Can you please close this issue? Or a t least update the list of modules without integration tests?

mariolenz avatar Sep 15 '20 17:09 mariolenz

I've just updated the list.

goneri avatar Sep 15 '20 18:09 goneri

@Akasurde @goneri In vSphere 7.0, the ESXi built-in VNC server has been removed. Users will no longer be able to connect to a virtual machine using a VNC client by setting the RemoteDisplay.vnc.enable configure to be true. (VMware vSphere 7.0 Release Notes)

The last version with a built-in VNC server, 6.7, will reach End of General Support 2022-10-15. So my suggestion is to deprecate vmware_guest_vnc, remove it at this date and ignore that it doesn't have any tests.

What do you think?

mariolenz avatar Mar 22 '21 14:03 mariolenz

@Akasurde @goneri FYI I've updated the list:

VMWARE_MODULES=$(find plugins/modules/ -name 'vmware_*.py' -exec basename -s .py {} \;)
for MODULE in ${VMWARE_MODULES}
do
    if ! test -d tests/integration/targets/$MODULE
    then
      echo "$MODULE"
    fi
done | sort

mariolenz avatar Jul 11 '22 17:07 mariolenz