-
Notifications
You must be signed in to change notification settings - Fork 32
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 terraform related test cases #979
Conversation
36b0233
to
9a66ebb
Compare
36b1da9
to
7b7a406
Compare
tested on delete image will always failed which might have some timing issue; and delete clusternetwork will occasionally hit same problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@pytest.fixture(scope="module") | ||
def image_resource(unique_name, image_opensuse, tf_resource): | ||
spec = tf_resource.image_download( | ||
f"tf_{unique_name}", unique_name, unique_name, image_opensuse.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider make prefix "tf_" a variable to reuse.
Changes
test_create_image
for legacytest_create_images_using_terraform
test_delete_image
test_create_volume_from_image
for legacytest_create_vol_with_image_terraform
TestNetworking
for legacytest_create_network_using_terraform
integration/test_terraform.py
whcih been replaced withintegration/test_z_terraform.py
fixtures/terraform.py
TerraformHarvester
ResourceContext
, andTerraformResource
to module scoperaw
field forResourceContext
TerraformResource
into version-based:BaseTerraformResource
for basic functionality, and other inherited classes for resources introduced from specific version.All Harvester terraform resources (image, volume, ssh_key, network, vlanconfig, clusternetwork, storageclass, virtualmachine and cloudinit_secret) has been implemented, but storageclass and VM related test cases are not implemented in this PR.