Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new linter version #40204

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions istioctl/cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func (f FileParseError) Error() string {
var (
listAnalyzers bool
useKube bool
failureThreshold = formatting.MessageThreshold{diag.Error} // messages at least this level will generate an error exit code
outputThreshold = formatting.MessageThreshold{diag.Info} // messages at least this level will be included in the output
failureThreshold = formatting.MessageThreshold{Level: diag.Error} // messages at least this level will generate an error exit code
outputThreshold = formatting.MessageThreshold{Level: diag.Info} // messages at least this level will be included in the output
colorize bool
msgOutputFormat string
meshCfgFile string
Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/writer/compare/comparator.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewXdsComparator(w io.Writer, istiodResponses map[string]*xdsapi.DiscoveryR
for _, resp := range istiodResponses {
if len(resp.Resources) > 0 {
c.istiod = &configdump.Wrapper{
&adminapi.ConfigDump{
ConfigDump: &adminapi.ConfigDump{
Configs: resp.Resources,
},
}
Expand Down
4 changes: 2 additions & 2 deletions pilot/cmd/pilot-agent/status/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ func TestAppProbe(t *testing.T) {
Port: intstr.IntOrString{IntVal: int32(appPort)},
Path: "/header",
HTTPHeaders: []apimirror.HTTPHeader{
{"Host", testHostValue},
{testHeader, testHeaderValue},
{Name: "Host", Value: testHostValue},
{Name: testHeader, Value: testHeaderValue},
},
},
},
Expand Down
26 changes: 13 additions & 13 deletions pilot/pkg/model/push_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1289,9 +1289,9 @@ func TestSetDestinationRuleInheritance(t *testing.T) {
serviceHostname: testhost,
expectedConfig: "svcRule",
expectedSourceRule: []types.NamespacedName{
{"istio-system", "meshRule"},
{"test", "nsRule"},
{"test", "svcRule"},
{Namespace: "istio-system", Name: "meshRule"},
{Namespace: "test", Name: "nsRule"},
{Namespace: "test", Name: "svcRule"},
},
expectedPolicy: &networking.TrafficPolicy{
ConnectionPool: &networking.ConnectionPoolSettings{
Expand Down Expand Up @@ -1320,8 +1320,8 @@ func TestSetDestinationRuleInheritance(t *testing.T) {
serviceHostname: testhost,
expectedConfig: "svcRule2",
expectedSourceRule: []types.NamespacedName{
{"istio-system", "meshRule"},
{"test2", "svcRule2"},
{Namespace: "istio-system", Name: "meshRule"},
{Namespace: "test2", Name: "svcRule2"},
},
expectedPolicy: &networking.TrafficPolicy{
ConnectionPool: &networking.ConnectionPoolSettings{
Expand All @@ -1345,9 +1345,9 @@ func TestSetDestinationRuleInheritance(t *testing.T) {
serviceHostname: testhost,
expectedConfig: "drRule2",
expectedSourceRule: []types.NamespacedName{
{"istio-system", "meshRule"},
{"test2", "drRule2"},
{"test2", "svcRule2"},
{Namespace: "istio-system", Name: "meshRule"},
{Namespace: "test2", Name: "drRule2"},
{Namespace: "test2", Name: "svcRule2"},
},
expectedPolicy: &networking.TrafficPolicy{
ConnectionPool: &networking.ConnectionPoolSettings{
Expand Down Expand Up @@ -1377,8 +1377,8 @@ func TestSetDestinationRuleInheritance(t *testing.T) {
serviceHostname: "unknown.host",
expectedConfig: "nsRule",
expectedSourceRule: []types.NamespacedName{
{"istio-system", "meshRule"},
{"test", "nsRule"},
{Namespace: "istio-system", Name: "meshRule"},
{Namespace: "test", Name: "nsRule"},
},
expectedPolicy: &networking.TrafficPolicy{
ConnectionPool: &networking.ConnectionPoolSettings{
Expand Down Expand Up @@ -1409,7 +1409,7 @@ func TestSetDestinationRuleInheritance(t *testing.T) {
serviceHostname: "unknown.host",
expectedConfig: "meshRule",
expectedSourceRule: []types.NamespacedName{
{"istio-system", "meshRule"},
{Namespace: "istio-system", Name: "meshRule"},
},
expectedPolicy: meshDestinationRule.Spec.(*networking.DestinationRule).TrafficPolicy,
},
Expand Down Expand Up @@ -1651,8 +1651,8 @@ func TestSetDestinationRuleMerging(t *testing.T) {
},
}
expectedDestRules := []types.NamespacedName{
{"test", "rule1"},
{"test", "rule2"},
{Namespace: "test", Name: "rule1"},
{Namespace: "test", Name: "rule2"},
}
ps.SetDestinationRules([]config.Config{destinationRuleNamespace1, destinationRuleNamespace2})
private := ps.destinationRuleIndex.namespaceLocal["test"].destRules[host.Name(testhost)]
Expand Down
Loading