`test/integration/kubelet` was failing staticcheck because it was
calling `t.Fatal` from the non-main Go routine. Address this by sending
errors causing t.Fatal back to a channel. The main thread can then
iterate through this channel, and call t.Fatal if there are any errors
in the channel.
TestWatchBasedManager was racing with the default namespace creation.
To fix that flake and to ensure integration tests using a shared etcd
don't accidentally overlap in the future, move the three main tests
using the default namespace to separate namespaces, and have
TestWatchBasedManager create that namespace before it runs.
Make StartTestServer wait for default namespace creation, which will
reduce other flakes until future changes completely remove use of default
namespace.
From a failed integration run:
watch_manager_test.go:66: namespaces "default" not found
watch_manager_test.go:66: namespaces "default" not found
watch_manager_test.go:66: namespaces "default" not found