Skip to content

Commit

Permalink
updates from validation review
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Weil committed Aug 11, 2020
1 parent 7e4015b commit 74d6ce9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions pkg/operator/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ func IsValidListenConfig(cfg *Config) error {
errs := []error{}

errs = append(errs, isValidHostPort(cfg.APIListen, "apiListen"))
errs = append(errs, isValidHostPort(cfg.MetricsListen, "metricsListen"))
errs = append(errs, isValidHostPort(cfg.PprofListen, "pprofListen"))

if len(errs) > 0 {
return errors.NewAggregate(errs)
Expand All @@ -59,8 +57,6 @@ func IsValidListenConfig(cfg *Config) error {
func IsValidPrestoConfig(cfg *Config) error {
errs := []error{}

errs = append(errs, isValidHostPort(cfg.PrestoHost, "prestoHost"))

if !cfg.PrestoUseTLS {
if cfg.PrestoUseClientCertAuth {
errs = append(errs, fmt.Errorf("prestoUseClientCertAuth cannot be set to true if prestoUseTLS is false"))
Expand Down Expand Up @@ -92,8 +88,6 @@ func IsValidPrestoConfig(cfg *Config) error {
func IsValidHiveConfig(cfg *Config) error {
errs := []error{}

errs = append(errs, isValidHostPort(cfg.HiveHost, "hiveHost"))

if !cfg.HiveUseTLS {
if cfg.HiveUseClientCertAuth {
errs = append(errs, fmt.Errorf("hiveUseClientCertAuth cannot be set to true if hiveUseTLS is false"))
Expand Down
18 changes: 0 additions & 18 deletions pkg/operator/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func TestIsValidConfig(t *testing.T) {
makeCfg: func() *Config {
cfg := validConfig()
cfg.APIListen = "foo:8080"
cfg.MetricsListen = "foo:443"
cfg.PprofListen = ":8080"
return cfg
},
},
Expand All @@ -40,22 +38,6 @@ func TestIsValidConfig(t *testing.T) {
},
expectedErr: "invalid apiListen",
},
"listen config - invalid metrics listen": {
makeCfg: func() *Config {
cfg := validConfig()
cfg.MetricsListen = "foo"
return cfg
},
expectedErr: "invalid metricsListen",
},
"listen config - invalid pprof listen": {
makeCfg: func() *Config {
cfg := validConfig()
cfg.PprofListen = "foo"
return cfg
},
expectedErr: "invalid pprofListen",
},
"presto config - valid": {
makeCfg: func() *Config {
cfg := validConfig()
Expand Down

0 comments on commit 74d6ce9

Please sign in to comment.