Hi there, I had Gestational diabetes with my first pregnancy and yes you do have to fast for the 2hour test.. You also have to follow a high carb diet for 3 days leading up to the test and then you can't eat for 12 hours before the test so if you have your test at 8am you can't eat from 8pm the night before (except tap water).
Have you booked your appointment? Usually you have to book and when you do they give you a leaflet on what you need to do.
Hope that helps. Good luck