Skip to content

Commit

Permalink
Fix mssql and mysql analyzers (#1359)
Browse files Browse the repository at this point in the history
fix mssql and mysql analyzers
  • Loading branch information
diamonwiggins authored Oct 9, 2023
1 parent cc56522 commit 32b0e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/analyze/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (a *AnalyzeMssql) collectorName() string {
if a.analyzer.CollectorName != "" {
return a.analyzer.CollectorName
}
return "mysql"
return "mssql"
}

func compareMssqlConditionalToActual(conditional string, result *collect.DatabaseConnection) (bool, error) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/analyze/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func (a *AnalyzeMysql) collectorName() string {
if a.analyzer.CollectorName != "" {
return a.analyzer.CollectorName
}
return "mssql"
return "mysql"
}

func (a *AnalyzeMysql) analyzeMysql(analyzer *troubleshootv1beta2.DatabaseAnalyze, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
fullPath := path.Join("mssql", fmt.Sprintf("%s.json", a.collectorName()))
fullPath := path.Join("mysql", fmt.Sprintf("%s.json", a.collectorName()))

collected, err := getCollectedFileContents(fullPath)
if err != nil {
Expand All @@ -58,7 +58,7 @@ func (a *AnalyzeMysql) analyzeMysql(analyzer *troubleshootv1beta2.DatabaseAnalyz

result := &AnalyzeResult{
Title: a.Title(),
IconKey: "kubernetes_mssql_analyze",
IconKey: "kubernetes_mysql_analyze",
IconURI: "https://troubleshoot.sh/images/analyzer-icons/mysql-analyze.svg",
}

Expand Down

0 comments on commit 32b0e1a

Please sign in to comment.