Several years ago we got a Supermicro in to repair. It would keep randomly powering off and if you left it alone it would randomly power up again. No reason, no logic. Power switch was OK on a DMM test, and in the end I had all the components separated as much as cables would allow to test ground leakage. The power module/CDROM etc were in their own enclosure so that was removed, motherboard etc up on cardboard but as soon as you took a long screwdriver and touched the metal chassis of the case with the metal box the CDROM was in the thing would power off.
I discovered there was a hidden reset switch on the power module, same type as the main switch so I swapped them over and the problem went away. It seemed that while the power switch itself tested ok for making contact while pressed there was JUST enough GND leakage going on to make the ACPI think someone was pressing the button.
That's 4 days of my life I won't get back.