* Fix some linter errors
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fixup: set func registry
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* test: better cleanup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: k8s dialer test improvements
* Use deployment, not pod directly.
* Use gcr.io/knative-samples/helloworld-go instead of nginx.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* refactor: dialer ctor accepts k8s config as param
This is in general better design since ctor does not relay on global
state in form of environment variable.
This also allows to run tests in parallel against various clusters.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: do run tests in a new namespace
Not all cluster users can create a new namesapce.
If we want to run test against non-admin users namespace must be ensured
by test invoker.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: better deletion policy
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: better random resource names
Related resource have common random suffix.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: bad connection handling for in cluster dialer
Connections were closed from wrong end of io.Pipe
which resulted in confusing error logs.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: DialContext() better error handling
Now DialContext() returns some errors immediately
instead of deferring it Read/Write operation on the returned connection.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: DialContext() more better error handling
Now ContextDial() tries to parse socat's stderr and translate it to Go's net.OpError
instead of just creating error with whole stderr embedded in it.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Apply suggestions from code review
Co-authored-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>