Open HolzmanoLagrene opened 11 months ago
Using the regular developer setups as proposed in the Wiki when trying to create new Tests that do not use RawDisk as Evidence type
RawDisk
Evidence
In my opinion when I look at these lines of code https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L47-L49 I expect to be able to pass a Evidence type and use that in the unittest.
Looking at a couple of lines later we see this: https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L70 This will, in any case, set the self.evidence object to Evidence of type RawDisk
self.evidence
Not sure if this is a bug or a misunderstanding on my side, but intuitively I would expect the Evidence type class to be instantiated and assigned to self.evidence later. Something like this:
self.task_class = task_class self.evidence_class = evidence_class ... self.evidence = self.evidence_class()
The task_class parameter does that in the line: https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L59
task_class
What steps will reproduce the bug?
Using the regular developer setups as proposed in the Wiki when trying to create new Tests that do not use
RawDisk
asEvidence
typeWhat is the expected behavior?
In my opinion when I look at these lines of code https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L47-L49 I expect to be able to pass a
Evidence
type and use that in the unittest.What do you see instead?
Looking at a couple of lines later we see this: https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L70 This will, in any case, set the
self.evidence
object to Evidence of typeRawDisk
Additional information
Not sure if this is a bug or a misunderstanding on my side, but intuitively I would expect the
Evidence
type class to be instantiated and assigned toself.evidence
later. Something like this:The
task_class
parameter does that in the line: https://github.com/google/turbinia/blob/a56d21e4e071d54caaa5d40c573a31cf04e7a7d4/turbinia/workers/workers_test.py#L59