Improve the unit test coverage for pkg/install Fixes #6339 Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>