Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValidateMeshConfigProxyConfig (0.41 sec)

  1. pkg/config/validation/agent/validation.go

    		}
    		if settings.PrivateKey == "" {
    			errs = AppendErrors(errs, fmt.Errorf("private key required for mutual tls"))
    		}
    	}
    
    	return
    }
    
    // ValidateMeshConfigProxyConfig checks that the mesh config is well-formed
    func ValidateMeshConfigProxyConfig(config *meshconfig.ProxyConfig) (errs error) {
    	if config.ConfigPath == "" {
    		errs = multierror.Append(errs, errors.New("config path must be set"))
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  2. pkg/config/mesh/mesh_test.go

    			assert.NoError(t, protomarshal.ApplyYAML(tt.result, want))
    
    			assert.Equal(t, mc.GetDefaultConfig(), want)
    		})
    	}
    }
    
    func TestDefaultProxyConfig(t *testing.T) {
    	if err := agent.ValidateMeshConfigProxyConfig(mesh.DefaultProxyConfig()); err != nil {
    		t.Errorf("validation of default proxy config failed with %v", err)
    	}
    }
    
    func TestDefaultMeshConfig(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  3. pkg/config/validation/agent/validation_test.go

    								},
    							},
    						},
    					}
    				},
    			),
    			isValid: true,
    		},
    	}
    	for _, c := range cases {
    		t.Run(c.name, func(t *testing.T) {
    			if got := ValidateMeshConfigProxyConfig(c.in); (got == nil) != c.isValid {
    				if c.isValid {
    					t.Errorf("got error %v, wanted none", got)
    				} else {
    					t.Error("got no error, wanted one")
    				}
    			}
    		})
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 39.1K bytes
    - Viewed (0)
Back to top