Skip to content

Commit

Permalink
Remove old test
Browse files Browse the repository at this point in the history
  • Loading branch information
renaz6 authored and denopink committed Aug 11, 2022
1 parent 872eaf3 commit 1618522
Showing 1 changed file with 0 additions and 70 deletions.
70 changes: 0 additions & 70 deletions basculehttp/bearerTokenFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,73 +233,3 @@ good:
})
}
}

// func TestProvideResolver(t *testing.T) {
// type In struct {
// fx.In
// R clortho.Resolver `name:"key_resolver"`
// }

// const yaml = `
// good:
// factory:
// uri: "http://test:1111/keys/{keyId}"
// purpose: 0
// updateInterval: 604800000000000
// `
// v := viper.New()
// v.SetConfigType("yaml")
// require.NoError(t, v.ReadConfig(strings.NewReader(yaml)))

// goodResolver, err := clortho.NewResolver(clortho.WithKeyIDTemplate("good"))
// require.Nil(t, err)

// tests := []struct {
// description string
// key string
// optional bool
// expectedResolver clortho.Resolver
// expectedErr error
// }{
// {
// description: "Success",
// key: "good",
// optional: false,
// expectedResolver: goodResolver,
// },
// {
// description: "Silent failure",
// key: "bad",
// optional: true,
// },
// }
// for _, tc := range tests {
// t.Run(tc.description, func(t *testing.T) {
// result := In{}
// assert := assert.New(t)
// require := require.New(t)
// app := fx.New(
// arrange.TestLogger(t),
// arrange.ForViper(v),
// ProvideResolver(tc.key, tc.optional),
// fx.Invoke(
// func(in In) {
// result = in
// },
// ),
// )
// err := app.Err()

// assert.Equal(tc.expectedResolver, result.R)
// if tc.expectedErr == nil {
// assert.NoError(err)
// return
// }
// require.Error(err)
// assert.True(strings.Contains(err.Error(), tc.expectedErr.Error()),
// fmt.Errorf("error [%v] doesn't contain error [%v]",
// err, tc.expectedErr),
// )
// })
// }
// }

0 comments on commit 1618522

Please sign in to comment.