Commit Graph
4 Commits
Author SHA1 Message Date
Gavin Frazar b48e711fdf Fix flaky basic auth dialer test (#18239)
* Fix flaky basic auth dialer test

* Block on sending error to waiters in ProxyAuthorizer, to avoid racing
  against the waiter.
* Change the test to start the node in a separate goroutine and
  manipulate the auth creds while it is still attempting to connect.
  This will allow us to significantly speed up the test since we can
  verify that the proxy authorizer is rejecting bad credentials but then
  change the credentials to be valid afterwards, allowing the node to
  succeed in registering and avoid long wait for it to fail to register.

* Use buffered chan

* Move the stopall defer up in case the test fails earlier

* Remove extra zero count check
2022-11-08 02:32:25 +00:00
Gavin FrazarandEdoardo Spadolini 6e316fcadb fix test alpn proxy http proxy basic auth dial flakiness (#17909)
* Update proxy handler and authorizer mocks

* Use a condition variable to properly sync checks for the last error received

* Fix test to check for all 3 nodes registering correctly

* Update naming of LastError to be more descriptive

* Refactor authorizer to not use a condition variable

* Remove 3rd node to speed up test

* Make test more robust

* Remove the reset count func

* Close client conns before new requests to be sure

* Connection -> Request terminology

* Change test to not mutate the environment variable, but instead manipulate the auth proxy credentials

* this way we can be sure that the test will work correctly when the credentials match. If we mutate env, we don't know whether the callers are still holding a dialer using the old env variable

* Remove extra node

* fix lint

* Fix req waiting

* Change wording in debug message

* fix comment

* Update integration/helpers/proxy.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Fix defer func

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2022-11-02 01:45:55 +00:00
Gavin Frazar 1858aafa15 Fix http proxy basic auth (#13140)
* Fix http proxy basic auth

* Update docs about HTTP CONNECT env var formats
2022-06-23 00:27:29 +00:00
Trent Clarke 3ff6889389 Split integration test fixtures into a package (#13465)
As a prelude to breaking individual integration test suites out into
their own packages (in order to make them more amenable to running
in parallel), this patch extracts the common test fixtures and places
them in a common `helpers` package.

This will allow the integration test package to share common
infrastructure and vocabulary once they are split out.
2022-06-15 17:07:26 +10:00