Yes, you might get fired. It depends on how bad the managers want to get rid of you.
If you are paying union dues, do not sign any write-ups. If you are told you are terminated, Ask the union to intervene and get you some kind of treatment. I know of two full timers that were fired but came back after treatments.
We have a guy who came in on his day off drunk and cussed out a customer and got into the face of a handicapped bagger and told him that he was going to kick his ass and he got his job back so with the union anything is possible!
Is it a swab test? If it is, you can pass it by just having a mint beforehand, and even if you don't do that marijuana is out of your saliva within 12-24 hours.
If you get injured in the job I think it's a urine test that is administered at the clinic where you received treatment. But if its a swab test swishing peroxide in your mouth does the trick.