Closed squaremo closed 11 months ago
do we have a make target that we can use to run each of these in isolation? In other words, now that we've separated them, how does an engineer run them separately?
I just do
go test -v -run Promo ./controllers/leveltriggered/
This did need a tiny bit of preparation: I took the value of KUBEBUILDER_ASSETS from a run of make test
and exported it, in .envrc
.
Thanks, it was the KUBEBUILDER_ASSETS bit that prompted my question.
This isolates the tests more, so they can be run selectively, and so they can use their own setup.
As a side issue: we decided earlier that replacing the whole set of strategies broke encapsulation too much; but, I think it may be the simplest way to make the test repeatable. Otherwise, the test can't be run with
--count
> 1. The dummy strategy is added each time, and refers to out-of-date app objects in its lexical closure. I have adjusted this.And as a diversion: the tests in controller_remote_test.go had an unreliable assumption, which I've fixed here because this is the PR where it was causing test failures most annoyingly.