Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading data from files in fakeserver.py #8

Open
tobiasbp opened this issue Aug 17, 2020 · 2 comments
Open

Loading data from files in fakeserver.py #8

tobiasbp opened this issue Aug 17, 2020 · 2 comments

Comments

@tobiasbp
Copy link
Collaborator

How do you feel about loading the test data returned by fakeserver.py from external files? We could use data dumped from running FreeNAS instances. We could also potentially run tests for different version of FreeNAS if the data was in a path like ./test/data/freenas13.3/disks.query.json.

@sdwilsh
Copy link
Owner

sdwilsh commented Aug 18, 2020

Throughout my career I've gone back and forth on this. On the one hand, I like small test cases when writing them, because it's less work for me to write the test out. On the other hand, I find it much easier to debug test failures when the method has as much logic in it as possible, so I'm jumping around less. Putting the data in the file often makes it hard to get via IDE's too (no click to jump to it).

I don't have a particularly strong preference, but we should be consistent. If we do go this route, I'd also prefer to have a script checked into to be explicit on how to generate the test data so it's easy to re-create.

@tobiasbp
Copy link
Collaborator Author

tobiasbp commented Aug 18, 2020

Good point about the need to be able to re-create the test data if it is to be loaded from files. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants