Open KonstantinGasser opened 2 years ago
@dominikbraun one follow-up question I have; If the file-system is separated in multiple interfaces for each resource. What would you suggest could be a "best" way to test the separated components? In the background there still will be one Fs struct
implementing all the resource interface. However, there could be separated tests each convening only one resource, was this what you mean by testing the components separately?
@dominikbraun one follow-up question I have; If the file-system is separated in multiple interfaces for each resource. What would you suggest could be a "best" way to test the separated components? In the background there still will be one
Fs struct
implementing all the resource interface. However, there could be separated tests each convening only one resource, was this what you mean by testing the components separately?
Yes, those tests for the Fs
methods should be stateless tests where it doesn't make a difference whether it only implements one of those segregated interfaces or the current "big" Filesystem
interface.
this is the start of the rolling PR for #121.
in
timetrace.go
I have defined three interfaces to interact with the filesystem.ProjectFS
,RecordFS
andReportFS
. The code will compile but not work since the dependency injection is not yet done for the interfaces. Inrecord.go
I have changed all current interactions with thefs
or theos/ioutil
lib with the newrecordFS
interface.I'd be happy for feedback on the interfaces and possible unclearness regarding decoupling the fs into multiple interfaces.