mirrord
mirrord copied to clipboard
Add E2E tests for file operations
With 2.2.0 release, we need e2e tests for the following functions:
- [x] open
- [ ] fopen
- [ ] fdopen
- [x] openat
- [x] read
- [ ] fread
- [ ] fileno
- [x] lseek
- [x] write
I can start work on this tomorrow!
Amazing, thanks!
currently, we do have tests for
- read
- write
- open (this is tested through read/write, so we dont need an explicit test)
- openat
- lseek
So, then, the list of tests for this issue:
- [x] open
- [ ] fopen
- [ ] fdopen
- [x] openat
- [x] read
- [ ] fread
- [ ] fileno
- [x] lseek
- [x] write
@thedanvail it would be nice if we could just figure cases where python calls f
family functions i.e. some real world scenarios and replicate them for the E2E. The tests implemented currently are for python only, would you be interested in working on tests for nodejs? Happy to help you in any possible way (:
Also we should probably separate the tests for open into various scenarios, so that we know which case went wrong
Sure, I can give that a shot - so I'll look at the f
functions in Python and get some mock scenarios going. After that, I'll work on getting the node tests going, but for the sake of focus/PR size, I'll probably split the node-e2e
tests into a separate PR from the python-e2e
tests. If that sounds fair, I'll get crackin' - but I'll probably have some questions and, in which case, I'll communicate with y'all on Discord!
Sounds great!
Just a quick update: This week has turned out to be very busy at work, but I've started to take a look just for context so far. Real work should begin tomorrow! Sorry for the delay!
hi @thedanvail, just wanted to check in with you if you were able to get the tests to work.. please feel free to reach out in case you need any help! (:
Hey Dan, I'm working on a refactor to the e2e, I'll probably do it in Python so writing e2e tests will be a bit easier (less concerns about safety & correctness there.)
Sorry folks - this week has been very chaotic with some family issues and finishing up my final week at my job, so I've not been communicating as well as I could/should have. I'm working on it now, unless @aviramha you want to do it under the umbrella of work in your refactor? I can pick up a different issue if you do intend to cover this in your refactor.
@thedanvail I hope all is well! I'm not planning to implement it, but just saying it might need to have a bit of changes to match the new design.
@thedanvail I hope all is well! I'm not planning to implement it, but just saying it might need to have a bit of changes to match the new design.
Yeah, just needed to leave as the company and myself aren't quite aligned anymore and I wanted to finish projects before I left so that I didn't leave them up in the air.
Duly noted - I'll take that into account!
PR added here