fix: Use instance identity session token for git subcommands (#4884)

This broke using gitssh with instance identity!
This commit is contained in:
Kyle Carberry
2022-11-04 09:44:36 -07:00
committed by GitHub
parent 3f6c4486f7
commit 8e743d28c8
3 changed files with 27 additions and 22 deletions
+4 -4
View File
@@ -533,9 +533,9 @@ func TestAgent(t *testing.T) {
}
initialized := atomic.Int32{}
closer := agent.New(agent.Options{
ExchangeToken: func(ctx context.Context) error {
ExchangeToken: func(ctx context.Context) (string, error) {
initialized.Add(1)
return nil
return "", nil
},
Client: client,
Logger: slogtest.Make(t, nil).Leveled(slog.LevelInfo),
@@ -567,8 +567,8 @@ func TestAgent(t *testing.T) {
}
filesystem := afero.NewMemMapFs()
closer := agent.New(agent.Options{
ExchangeToken: func(ctx context.Context) error {
return nil
ExchangeToken: func(ctx context.Context) (string, error) {
return "", nil
},
Client: client,
Logger: slogtest.Make(t, nil).Leveled(slog.LevelInfo),