If you are getting insurance through an employer or other group policy, you will probably not have to take a drug test or a physical exam. Group policies are intended to be applied to the widest range of members, and the premiums are adjusted to account members who fall into certain risk groups, including recreational drug use.
If you are purchasing private health insurance, whether or not you will have to take a drug test depends on the company you are dealing with and the state you live in. The state matters because insurance is regulated by state laws, not government laws, and some states prohibit drug testing for insurance purposes. Even in states where drug testing is allowed, many health insurance providers don't bother with drug testing. It is an expensive process, and is not effective at differentiating between recreational and chronic drug users.
Government sponsored health insurance insurance can and will require drug testing. Drug use is considered counter-productive to a healthy family and family services use drug testing to determine who is complying to regulations and who is contemptuous of the system that is trying to help them.
No one can tell you for certain that you will not be tested, but routine drug-testing is rare in all but government sponsored health care. On the other hand, if it can be shown that you had a drug-related condition or addiction prior to getting insured, the insurance company can refuse any related claims on the basis of a pre-existing condition. It is better not to lie to the insurance company if you are asked about drug use, but getting tested for illegal substances is not likely.