Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Aug 1, 2022
1 parent 83b94fa commit 06e40ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/remote-storage/app/flags_test.go
Expand Up @@ -27,7 +27,7 @@ import (
func TestQueryBuilderFlags(t *testing.T) {
v, command := config.Viperize(AddFlags)
command.ParseFlags([]string{
"--host-port=127.0.0.1:8081",
"--grpc.host-port=127.0.0.1:8081",
})
qOpts, err := new(Options).InitFromViper(v, zap.NewNop())
require.NoError(t, err)
Expand All @@ -37,11 +37,11 @@ func TestQueryBuilderFlags(t *testing.T) {
func TestQueryOptions_FailedTLSFlags(t *testing.T) {
v, command := config.Viperize(AddFlags)
err := command.ParseFlags([]string{
"--tls.enabled=false",
"--tls.cert=blah", // invalid unless tls.enabled
"--grpc.tls.enabled=false",
"--grpc.tls.cert=blah", // invalid unless tls.enabled
})
require.NoError(t, err)
_, err = new(Options).InitFromViper(v, zap.NewNop())
require.Error(t, err)
assert.Contains(t, err.Error(), "failed to process TLS options")
assert.Contains(t, err.Error(), "failed to process gRPC TLS options")
}

0 comments on commit 06e40ea

Please sign in to comment.