Don't carry out an insulation test on anything electronic!
Test the wiring, but don't test the device. Doing a 500 volt DC test on a device not rated for 500v is a sure way to end up with problems in my opinion (being a young spark (electrician) many years ago I tested a lighting circuit only to kill a whole load of electronic lighting ballasts).
Earthing and providing a means of earth differs around the world by locality, and it can be a very emotive issue with everyone believing they, the system they learnt, or that in their locality is right.
However... a basic rule remains.... if the device is wired up with live and neutral (or hot wire to hot wire), the leakage to the casing or earth point should be zero.... or you have a problem.
30mA is a high leakage current, and I'd suggest in plugging each of your drives and motors, testing the wiring, and then plugging each of the drives and motors in in turn to establish which drive and motor has the leakage issue. If you need to swap the drives and motors around to establish which drive or driver is creating the problem exactly, then I'd suggest doing that.
I'd suggest running a gcode file which tests just that one axis motion at full rapid movement.... such as g0 x100, g0 x0 back and forth....id open up Microsoft excel and drag 150 lines of g0 motion, and copy and paste it into a tap file. So it will give you time to test the machines leakage.
I suspect you have a wiring problem (note I've not seen your machine, don't shoot the cnc messenger!)... I'd suggest that somewhere the wiring is getting mixed up with ground, 0volt or something like that.
I'd suggest stop for a moment (as I know this can be emotive), and just reconsider all of the circuits in your machine, as they need to be wired relative to each other because of the way that they manipulate voltages
Start at the electrical supply... you have two main wires (forget about earth for a moment as some parts of the world use one of the hot wires as earth as its also the grounded neutral point, instead of the centre tap neutral which seem to be the way it's done in to US for domestic supplies (nomenclature different, outcome the same)
These two wires will be wires up to your low voltage supplies one for the 5v, 24v and another for your drives.
The output of these (however many you have and whatever their voltages) are relative to the two output wires... do not at any point connect these to the earth terminal, even if they say zero volt (0v)
These lower voltage power supplies are then connected to your motion controller, and break out boards, and spindle and drives.... some of these have outputs... such as the motor drives... take the wires out of these and wire them direct to the motors... at no point should any of these output wires be connected to the earth point, casing, frame etc, even if they say GND or 0V.
Same thing with bob sensors....
Now, at this point your earth is wired, and it is basically only connected to the casing of each device, or a dedicated terminal that says earth...
Be very careful when the device says "GND" as it may not actually be the earthing point.... test it with a voltmeter set on ohms or diode beep test between the terminal and the casing.
Only this casing earth hours back to your incoming electrical supply earth.
Sorry for the long post
Rob