Your fears are legitimate because the worse could happen. The good news is that it's unlikely to go that way. However, be sure you have an experienced attorney with you who knows of your situation, so the attorney can attempt to protect you if things start that way.
Many courts require a person out on bond to take regular urinalysis teste in order to enuse they are not taking any illegal substances. It is called a condition of their bond. A positive UA could, and most likwly will, case the bond to be found insufficient, the person to be arrested in court and required to post a new bond. It is the probation department that oversees the UA's. If the judge askes if you might test positive, be homest and tell him what might show up. Usually you get a "pass" in a first test if you are honest. However, if you show up to court under the influence, that ia a whole other story.
I agree with the other posted responses. Do not use any more illegal substances while you are on bond. The consequences can be severe and there is absolutely no reason to take any chance of making your situation worse than it already is at this point.
Sign up to receive a 3-part series of useful information and legal advice about DUIs.