pomerium-cli: add support for a custom browser command (#2617)

This commit is contained in:
Caleb Doxsey 2021-09-21 08:31:30 -06:00 committed by GitHub
parent efffe57bf0
commit a7442b1498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 17 deletions

View file

@ -36,11 +36,8 @@ func TestAuthClient(t *testing.T) {
_ = srv.Serve(li)
}()
origOpenBrowser := openBrowser
defer func() {
openBrowser = origOpenBrowser
}()
openBrowser = func(input string) error {
ac := New()
ac.cfg.open = func(input string) error {
u, err := url.Parse(input)
if err != nil {
return err
@ -64,7 +61,6 @@ func TestAuthClient(t *testing.T) {
return nil
}
ac := New()
rawJWT, err := ac.GetJWT(ctx, &url.URL{
Scheme: "http",
Host: li.Addr().String(),