Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Functional test for unsupported target network type
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dzon <jdzon@redhat.com>
  • Loading branch information
Jakub Dzon committed Jun 24, 2020
1 parent 39ebd9e commit 64e7229
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/functional-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
| :---------------- | :---------:
| Import with missing network resource mapping should be blocked | &check; |
| Import with network mapping to a non-existing target network should be blocked | &check; |
| Import with network mapping to unsupported target type should be blocked | &check; |
| Import with storage mapping to a non-existing target storage class should be blocked | &check; |
| Import with disk mapping to a non-existing target storage class should be blocked | &check; |

Expand Down
2 changes: 2 additions & 0 deletions tests/common-vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ var (
PodType = "pod"
// MultusType defines `pod` resource mapping network type
MultusType = "multus"
// UnsupportedType defines non-existing, unsupported `unsupported resource mapping network type
UnsupportedType = "unsupported"
)
4 changes: 4 additions & 0 deletions tests/ovirt/resource_mapping_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ var _ = Describe("VM import ", func() {
&[]v2vv1alpha1.ResourceMappingItem{{Source: v2vv1alpha1.Source{ID: &vms.VNicProfile1ID}, Type: &tests.MultusType, Target: v2vv1alpha1.ObjectIdentifier{Name: "no-such-net-attach-def"}}},
nil,
nil),
table.Entry("network mapping to unsupported target type",
&[]v2vv1alpha1.ResourceMappingItem{{Source: v2vv1alpha1.Source{ID: &vms.VNicProfile1ID}, Type: &tests.UnsupportedType, Target: v2vv1alpha1.ObjectIdentifier{Name: "some-network"}}},
nil,
nil),
table.Entry("storage domain mapping to non-existing target storage class",
&[]v2vv1alpha1.ResourceMappingItem{{Source: v2vv1alpha1.Source{ID: &vms.VNicProfile1ID}, Type: &tests.PodType}},
&[]v2vv1alpha1.ResourceMappingItem{{Source: v2vv1alpha1.Source{ID: &vms.StorageDomainID}, Target: v2vv1alpha1.ObjectIdentifier{Name: "no-such-storage-class"}}},
Expand Down

0 comments on commit 64e7229

Please sign in to comment.