Scottish government challenged over publicly owned renewables