DDan Kenigsbergconsistent copyright notice
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
tests: Replace kubevirt client getter with one that has no error In the end-to-end tests the kubevirt client is frequently fetched and used. The client getter implements a singleton which creates a client once and afterwards returns the same repeatedly. As such, an error may occur only once, at the initial creation. Any call afterwards will just return the same, which in practice means that there will be no such scenario (first usage is in the test suite setup, which will fail all the suite immediately). Therefore, there is no point in repeatedly checking the error at each usage. This change wraps the kubevirt client getter with a function that does not return the error. Instead, it just panics if there is an error. The existing convention already raised a panic on any error received, therefore there is no significant logic change in most usages. New code should use this client wrapper to simplify the code. Furthermore, it is recommended to call the getter directly instead of passing the client itself down the stack. Signed-off-by: Edward Haas <edwardh@redhat.com> | 3 年前 | |
consistent copyright notice Red Hat is willing to mark these files as copyrighted by the KubeVirt Authors. This is a follow-up of commit e36bb0bd79976 sed -i 's/\(20.., \)*20.. Red Hat, Inc./The KubeVirt Authors./' git grep -l '20.. Red Hat, Inc.'|grep -v staging|grep -v vendor|grep -v kubevirtci Signed-off-by: Dan Kenigsberg <danken@redhat.com> | 1 年前 |