Skip to content

Commit

Permalink
fix: pdb test
Browse files Browse the repository at this point in the history
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
  • Loading branch information
matthisholleville committed Apr 10, 2023
1 parent fd936ce commit 705d2a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pkg/analyzer/pdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ func (PdbAnalyzer) Analyze(a Analyzer) ([]Result, error) {
failures = append(failures, Failure{
Text: fmt.Sprintf("%s, expected label %s=%s", evt.Message, k, v),
Sensitive: []Sensitive{
Sensitive{
{
Unmasked: k,
Masked: util.MaskString(k),
},
Sensitive{
{
Unmasked: v,
Masked: util.MaskString(v),
},
Expand All @@ -45,7 +45,7 @@ func (PdbAnalyzer) Analyze(a Analyzer) ([]Result, error) {
}
for _, v := range pdb.Spec.Selector.MatchExpressions {
failures = append(failures, Failure{
Text: fmt.Sprintf("%s, expected expression %s=%s", evt.Message, v),
Text: fmt.Sprintf("%s, expected expression %s", evt.Message, v),
Sensitive: []Sensitive{},
})
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/analyzer/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ func (ServiceAnalyzer) Analyze(a Analyzer) ([]Result, error) {
failures = append(failures, Failure{
Text: fmt.Sprintf("Service has no endpoints, expected label %s=%s", k, v),
Sensitive: []Sensitive{
Sensitive{
{
Unmasked: k,
Masked: util.MaskString(k),
},
Sensitive{
{
Unmasked: v,
Masked: util.MaskString(v),
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/analyzer/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func (StatefulSetAnalyzer) Analyze(a Analyzer) ([]Result, error) {
failures = append(failures, Failure{
Text: fmt.Sprintf("StatefulSet uses the service %s/%s which does not exist.", sts.Namespace, serviceName),
Sensitive: []Sensitive{
Sensitive{
{
Unmasked: sts.Namespace,
Masked: util.MaskString(sts.Namespace),
},
Sensitive{
{
Unmasked: serviceName,
Masked: util.MaskString(serviceName),
},
Expand All @@ -45,7 +45,7 @@ func (StatefulSetAnalyzer) Analyze(a Analyzer) ([]Result, error) {
failures = append(failures, Failure{
Text: fmt.Sprintf("StatefulSet uses the storage class %s which does not exist.", *volumeClaimTemplate.Spec.StorageClassName),
Sensitive: []Sensitive{
Sensitive{
{
Unmasked: *volumeClaimTemplate.Spec.StorageClassName,
Masked: util.MaskString(*volumeClaimTemplate.Spec.StorageClassName),
},
Expand Down

0 comments on commit 705d2a0

Please sign in to comment.