I’m writing a jvm task test for a task that uses a...
# general
e
I’m writing a jvm task test for a task that uses an invalidated block. Unfortunately the invalidated block tries to fingerprint the task, which involves fingerprinting all the subsystems that it needs, which don’t exist in the test context. Is there a well known way to work around this, or should I just mock out the fingerprinting?
w
can use
init_subsystem
, but it can be challenging to use
Subsystems
are global singletons in v1, so initializing them is a sideeffect.
e
I see. So init the subsystems on the task under test before executing?
w
yea.
e
Is there a way to get all the subsystem deps of a task from the task?
lol okayyy.
subsystem_dependencies
w
(the answers to these questions are veeery different in v2!)
but yea, exactly.
e
I think this is the kind of difficulty you mean…apparently one of the things that is passed as a subsystem_dependency is not a subclass of subsystem. Should I just filter it out?
w
um, it will probably be a "scoped subsystem instance". but yes. you might consider whacking moles rather that constructing the entire dependency set
e
yeah…makes sense
w
sorry.
e
np. thanks for the help
Which subsystem creates the nailgun-server? Having a hard time tracking it down.
hm looks like I can just mock it out.