Mirantis / virtlet

Kubernetes CRI implementation for running VM workloads
Apache License 2.0
743 stars 128 forks source link

File injection test using fakekubeclient #861

Closed jellonek closed 5 years ago

jellonek commented 5 years ago

This change is Reviewable

jellonek commented 5 years ago

I'm not fully sure how you would add that. Are you suggesting to add to struct in https://github.com/Mirantis/virtlet/blob/ffad578784807d1773335b7729e23c1b4477fd69/pkg/libvirttools/virtualization_test.go#L343 additional field for parameters needed by fake kube client as in https://github.com/Mirantis/virtlet/pull/861/files#diff-1fd8fde46fcffd8abd9ee1c4e043e6beR296 and basically rest of the lines from this test case before https://github.com/Mirantis/virtlet/blob/ffad578784807d1773335b7729e23c1b4477fd69/pkg/libvirttools/virtualization_test.go#L476 line for testcases with non nil values for fake kube client parameters? That would do the job, but would imo unnecessary enlarge already long body of https://github.com/Mirantis/virtlet/blob/ffad578784807d1773335b7729e23c1b4477fd69/pkg/libvirttools/virtualization_test.go#L468 loop. Hmmm... I can refactor that a bit to make it more readable adding also handling this extension to tc struct.

jellonek commented 5 years ago

PR updated according to suggestion.

jellonek commented 5 years ago

In fact it does. Ok, removed.