How about 3, 3, and 2?
Test 1-2, 1-3, 2-3. If flashlight does not work then at most one of them is good. Next try 4-5, 4-6, 5-6. If flashlight does not work, then at most one of these is good. So you know that 7 and 8 are good and will work in the flashlight.