Valachi ratted because he faced the death penalty for killing a federal inmate. That was the point of him flipping.

They didn't use his testimony in trials because he was a sidewalk hood who didn't know have knowledge of many crimes personally except for his own little shakedowns.

As for Genovese doing it on purpose, I doubt that he knew Valachi would end up killing an innocent inmate, flipping and testifying in front of Congress. He would have needed a crystal ball to tell the future, unless you think Valachi was in on it and was the greatest actor in history.