There may be some hope.
The basic limits:
1) As everyone's saying, it's Buyer Beware. The short test drive, & trusting their word, is on you. You won't get anywhere with those claims. The car is sold as is except for the written warranty. I've been in new car dealer that used a 1 mile route & that's all you were allowed. Dealers always try to send someone with you. You can ask to go alone & sometimes they'll let you, but it's their car, they have a right to ride along.
2) You need to find out what's causing the check light. It could be something small, & nothing to stress over. A loose gas cap can trigger it. Many auto parts stores will read the codes for you for free or small fee. It can give an idea. They will only read the first level of codes. A mechanic shop can read the other levels with the specific problem, but often charge since it takes more effort. If they are honest,, the dealer will tell you, & if not, you'll be stuck again with them turning off the code.
3) A check engine light or anything on a car, especially at 115K can start as you drive off the lot. It happens. Ex: I was selling a car, & to prep for a potential buyer, I got gas & the light went on. It went off again. It may have been the gas cap, or something serious. Had I not happened to get gas, & they did a small test ride, I might have sold it knowing for the last 2 years it had never been on.
So that said:
4) It's possible the dealer will come through. In a small town where reputation matters, some places do mean what they say.
5) Many counties in US have "consumer affairs" departments. The majority of complaints will be car repairs & car sales. They can tell you if the dealer is properly licensed. If there's been fraud from them, & the dept is anxious to help stop it, & can go to bat for you. They can tell you exactly what steps might help in your situation. I'd guess they'll suggest writing a letter & sending it certified, if the trip to the shop doesn't solve it all. Mentioning consumer affairs (after talking with them) to the dealer during your visit, can quietly help motivate them to take care of your problem.
6) If the dealer committed direct intentional fraud, that would give you grounds. You'd have to prove it, which is not so easy. So if they knowingly turned off the check engine light to mask a big problem, that would be illegal. If the problem is obviously longer lasting, then it's easy to point out that the light was on. Some cars tell a tiny sort of history of recent light triggerings. This is where, if the consumer affairs is aware of problems with the dealer, they may be able to pressure them, or otherwise help you sort it out. (For instance, if the last 5 people who bought from the dealer report the same experience.)
Rolling back the odometer & lying about it on paperwork is fraud. With 115k it's not likely, but buying a carfax even now may help. You can also see for instance, if it's a salvage with a faked title. However, if it was a in a accident & didn't tell you, that's legal. It's when they falsify government paperwork, that it's illegal. Generally dealers know how to make positive sounding statements that are "just so", they can't be labeled fraud. Ex: they said their mechanic checks it - but not whether he's any good & no guaranty that he finds all or any of the problems.
Even if CA can help fuss, if it's a smaller repair or even a big one you can afford, life is short & sometimes just doing the repair yourself & leaving a complaint with them for their records, is the best way to go.
7) If it turns out to be significant, you can either sell the car. Or if you get it repaired, be cautious about finding a reputable place & talk with consumer affairs about how to not get ripped off on the repair. Do not assume this dealer will be honest in the repair process. Take it for a 2nd opinion. Do not let them pressure you into "now or never." That's a great sign that you are about to be ripped off again. If you sell, you can't outright deceive & lie (at least in the county I'm in), but you don't have answer anything directly, especially if not asked. That's how even private sellers can seem good, but leave you with a car with an issue.
8) If you google buying used cars, many sites have advice for how to avoid this the next time, that are well worth it.
Hopefully it will be a reasonably costing repair & you'll be disappointed in the experience, but soon will be past this point, & happily enjoying your new car.