Closed jiacai2050 closed 1 year ago
@ShiKaiWi @waynexia How do you guys think about this?
In short, this ticket suggests getting rid of .out
file and writing the execution result directly into .result
file. Then make use of git to tracking/comparing/reverting the new result, right?
Exactly
Makes sense to me 💯 I was trying to find a way to better integrate git and diff into sqlness' workflow, but haven't thought of just dropping .out
file and letting git track 🥲.
save original result file in Vec or tempfile
Do we have to keep the previous result before overwriting? If the diff comes from different behavior of code changes, the original result is likely to be tracked in git.
Yes, but in some environment there maybe not have git info, such as download src via zip....
I just think git is not a must dependency for sqlness to work.
Yes, but in some environment there maybe not have git info, such as download src via zip....
I just think git is not a must dependency for sqlness to work.
Great 👍 . Remind me CI is such an environment that doesn't have git.
😁 I will implement this feature soon.
Describe This Problem
In current usage pattern, sqlness will write query response to
.out
file, and it's used to be compared with corresponding.result
, while this works for basic case, it becomes verbose when we change some behaviors of server, and lots of.result
file need to be updated ONE AFTER ONE.Proposal
I suggest another pattern to compare result:
It works like this
result
file directly can save us onemv
commandresult
file,result
file is what we expected, just check into git withgit add ...
git checkout ...
, update testcase and run againI think this usage pattern is more efficient than before.
Additional Context
No response