-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
695de14
commit fdaadba
Showing
29 changed files
with
432 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ func TestWhoAmI(t *testing.T) { | |
cfg.Keyring.MockMode = true | ||
|
||
var err error | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
|
@@ -47,7 +47,7 @@ func TestWhoAmI(t *testing.T) { | |
t.Fatal(err) | ||
} | ||
|
||
if want, got := "Hello [email protected]!\n", buf.String(); want != got { | ||
if want, got := "Hello [email protected]!\n", buf.String(); want != got { | ||
t.Errorf("want output %q, got %q", want, got) | ||
} | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,25 +59,32 @@ func TestLcl(t *testing.T) { | |
cfg.API.URL = srv.URL | ||
cfg.AnchorURL = "http://anchor.lcl.host:" + srv.RailsPort + "/" | ||
cfg.Lcl.DiagnosticAddr = diagAddr | ||
cfg.Lcl.Service = "hi-example" | ||
cfg.Lcl.Subdomain = "hi-example" | ||
cfg.Lcl.Service = "hi-ankydotdev" | ||
cfg.Lcl.Subdomain = "hi-ankydotdev" | ||
cfg.Trust.MockMode = true | ||
cfg.Trust.NoSudo = true | ||
cfg.Trust.Stores = []string{"mock"} | ||
|
||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
t.Run("basics", func(t *testing.T) { | ||
ctx, cancel := context.WithCancel(ctx) | ||
defer cancel() | ||
|
||
drv, tm := uitest.TestTUI(ctx, t) | ||
|
||
cmd := Command{ | ||
Config: cfg, | ||
} | ||
|
||
errc := make(chan error, 1) | ||
go func() { errc <- cmd.UI().RunTUI(ctx, drv) }() | ||
go func() { | ||
errc <- cmd.UI().RunTUI(ctx, drv) | ||
|
||
tm.Quit() | ||
}() | ||
|
||
// wait for prompt | ||
|
||
|
@@ -100,7 +107,7 @@ func TestLcl(t *testing.T) { | |
}) | ||
|
||
if !srv.IsProxy() { | ||
t.Skip("diagnostic unsupported in non-mock mode") | ||
t.Skip("diagnostic unsupported in mock mode") | ||
} | ||
|
||
teatest.WaitFor( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,13 +23,13 @@ func TestProvision(t *testing.T) { | |
cfg := new(cli.Config) | ||
cfg.API.URL = srv.URL | ||
cfg.AnchorURL = "http://anchor.lcl.host:" + srv.RailsPort | ||
cfg.Lcl.Service = "hi-example" | ||
cfg.Lcl.Subdomain = "hi-example" | ||
cfg.Lcl.Service = "hi-ankydotdev" | ||
cfg.Lcl.Subdomain = "hi-ankydotdev" | ||
cfg.Trust.MockMode = true | ||
cfg.Trust.NoSudo = true | ||
|
||
var err error | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ func TestAudit(t *testing.T) { | |
cfg.Trust.Stores = []string{"mock"} | ||
|
||
var err error | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
if cfg.API.Token, err = srv.GeneratePAT("[email protected]"); err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.