even if you got it off your record by doing community service?
You do not get drug tested at the green card interview, but you need to gather all of your court records and discuss this ticket with an immigration attorney directly. You need to disclose the ticket even if does not have an immigration consequence, but getting something "off your record" in state court does not usually erase it for immigration purposes. Whether this has a consequence will depend on the details of the offense, you need to talk to an attorney directly. Good luck!