adding tests and default value for cleanupOldDeploys