Provision and snapshot tests have a lot of logic built into the test case itself to construct input objects to the functions. For examples: https://github.com/kubernetes-csi/external-provisioner/blob/16a2da32e052db2e2eaa31d51b70b202a9b39319/pkg/controller/controller_test.go#L1487 https://github.com/kubernetes-csi/external-provisioner/blob/16a2da32e052db2e2eaa31d51b70b202a9b39319/pkg/controller/controller_test.go#L2020 I think it would be cleaner to refactor these tests to use a builder pattern and construct the input object when defining the test cases.