In the US most transportation workers are subject to preemployment, reasonable suspicion, after incident, and random drug testing. That includes commercial boat captains, truck & bus drivers, pilots, etc. If there's an incident in a commercial vehicle all involved get tested. Zero tolerance there and it's a condition of employment. If your employer thinks you're acting strangely (called reasonable suspicion, as a supervisor I had to take classes on that) they can test you. Penalty is at the very least loss of license. "Under the influence" is not debated, any presence or refusal to test is a violation. They test for pot, meth, opioids, amphetamines and cocaine. Alcohol is also tested after incident but that's a separate reg. It all started many years ago when two passenger trains collided head on killing hundreds. Both drivers bodies (they both died) showed high levels of cocaine. When I was actively working my Master ticket, I got random tested many times, the company had to send several members of the crews in at least four times a year. And I have to test to renew the license and before any new employment.