Fork me on GitHub

polylith 4
🎉 6
Jungwoo Kim10:07:23

Hi imre! I’m trying to use polylith-kaocha and am I right that some hooks like pre|post-test|load(etc) don’t support yet? I’ve looked up the source code and found nothing about it.

Jungwoo Kim10:07:55

cuz I want to do integration tests and need some hooks!


Kaocha hook you mean? Those should be supported


You provide your kaocha config as a resource and whatever you set in it should be grand

Jungwoo Kim10:07:36

yeah, I mean Kaocha hooks


But if you have trouble with something, let me know


Repro case is welcome in these cases

Jungwoo Kim10:07:42

That already works but I think I’m confused with hooks in kaocha config and one.


Ah, those are polylith-kaocha's own hooks

👍 1

In casr it does something differently from how consumers like

👍 1
Jungwoo Kim10:07:36

Then, all I just have to do is make hooks in kaocha config?


That's where I'd start yeah


Theres no connection between the two groups of hooks

Jungwoo Kim10:07:58

Ok cool! great! wanna ask one more thing!

Jungwoo Kim10:07:56

clojure -Srepro -M:poly test project:my-project
I do test my-project including serveral bricks (bases/components) including also have tests. In that case, how hooks in kaocha config placed in my-project work?

Jungwoo Kim10:07:34

tests.edn in my-project and I imagined that every bricks are hooked pre-test


no, the kaocha runner is only invoked once per project


in the current implementation, that is

Jungwoo Kim10:07:43

Ahh, do you consider my requirement is needed in the future?

Jungwoo Kim10:07:06

at the same time, that’s not a good use case cuz polylith suggest that integ test would be in a project, not in bricks. That means, in general, we wouldn’t need hooks in bricks?


I’m not sure. Polylith doesn’t have per-brick test setup/teardown. I haven’t had the need to have that. Integration tests should IMO operate at the project level


If this presents a difficulty, you could add a and invoke kaocha in a different way, i.e. per brick somehow


I saw there is a fork of polylith-kaocha that adds support for, not sure if that is something that would help you

👍 1

You could also create an issue in the repo so a potential feature could be discussed and specified

👍 1
Jungwoo Kim23:07:56

Thanks for your comment. I’ll figure out my test structure and needs. 🙂