Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rosstimothy committed Oct 4, 2021
1 parent 64c1d92 commit 3baa51d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/events/gcssessions/gcsstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (

// TestStreams tests various streaming upload scenarios
func TestStreams(t *testing.T) {
ctx := context.Background()
uri := os.Getenv(teleport.GCSTestURI)
if uri == "" {
t.Skip(
Expand All @@ -49,7 +50,7 @@ func TestStreams(t *testing.T) {
err = config.SetFromURL(u)
require.NoError(t, err)

handler, err := DefaultNewHandler(config)
handler, err := DefaultNewHandler(ctx, config)
require.NoError(t, err)
defer handler.Close()

Expand Down Expand Up @@ -79,7 +80,7 @@ func TestStreams(t *testing.T) {
return composer.Run(ctx)
}

handler, err := DefaultNewHandler(config)
handler, err := DefaultNewHandler(ctx, config)
require.NoError(t, err)
defer handler.Close()

Expand All @@ -105,7 +106,7 @@ func TestStreams(t *testing.T) {
return nil
}

handler, err := DefaultNewHandler(config)
handler, err := DefaultNewHandler(ctx, config)
require.NoError(t, err)
defer handler.Close()

Expand Down
2 changes: 1 addition & 1 deletion lib/events/s3sessions/s3handler_thirdparty_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestThirdpartyStreams(t *testing.T) {
faker := gofakes3.New(backend, gofakes3.WithLogger(gofakes3.GlobalLog()))
server := httptest.NewServer(faker.Server())

handler, err := NewHandler(Config{
handler, err := NewHandler(context.Background(), Config{
Credentials: credentials.NewStaticCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY", ""),
Region: "us-west-1",
Path: "/test/",
Expand Down

0 comments on commit 3baa51d

Please sign in to comment.