harvester / tests

Harvester test cases
Apache License 2.0
10 stars 31 forks source link

[e2e] Implement Tests For VM OpenStack Import #1373

Open irishgordo opened 2 months ago

irishgordo commented 2 months ago

Based On:

We'll need to implement tests that demonstrate adding the OpenStack Source and Importing a VM.

What's Needed

For elements like:

openstack image create --disk-format raw --progress --public --project-domain default --file /home/mike/Documents/temp-possible-openstack/focal-server-cloudimg-amd64-disk-kvm.img ubuntuimg --os-auth-url http://IPV4/identity --os-identity-api-version 3 --os-project-name admin --os-project-domain-name default --os-username admin --os-password testtesttest

openstack volume create --size 10 --image ubuntuimg --bootable ubuntuinstvol --os-auth-url http://IPV4/identity --os-identity-api-version 3 --os-project-name admin --os-project-domain-name default --os-username admin --os-password testtesttest

openstack server create --volume ubuntuinstvol --flavor m1.medium --network shared --user-data /home/mike/Documents/temp-possible-openstack/initial-vm-cloud-init.txt --wait ubuntuinstance --os-auth-url http://IPV4/identity --os-identity-api-version 3 --os-project-name admin --os-project-domain-name default --os-username admin --os-password testtesttest

Building out the image, the volume, the server. Ensuring the server is up & running on OpenStack. Then creating the :

Then ensuring post tests, everything is torn down from the OpenStack side

This will rely on something hosting a clouds.yaml file - and additional parameters being injected from jenkins / ansible-configuration / settings.yml