mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
60b7d3a8df
* refactor(sonar): add initial metadata file for GO-based sonar step * refactor(sonar): add initial generated files for GO-based sonar step * refactor(sonar): add initial step file for GO-based sonar step * refactor(sonar): add sonar cmd to executable * refactor(sonar): cleanup metadata file * fix(go): use capital TLS in golang names * add download of Sonar scanner cli * move download & unzip methods to FileUtils * download certificate files * use http.Downloader * update generated code * add slice prefix function * update sonar step * add test cases * update docs * use node:lts image * use latest sonar-scanner * add test cases * use latest sonar-scanner * fix test case * change things * return errors on functions * limit changeID visibility * use lowercase scm provider * add test case for legacy PRs * add test case * update docs * use local temp dir * extend parameter visibility to GENERAL * use SONAR_AUTH_TOKEN * remove comments * update generated code * Apply suggestions from code review * change to private fields * use setter for sonar options & environment * remove obsolete return statement * add comment about Downloader mock * add test case for custom options * handle custom options * refactor slice functions * fix go fmt * fix generated step code * update docs
17 lines
331 B
Go
17 lines
331 B
Go
package cmd
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestSonarExecuteScanCommand(t *testing.T) {
|
|
|
|
testCmd := SonarExecuteScanCommand()
|
|
|
|
// only high level testing performed - details are tested in step generation procudure
|
|
assert.Equal(t, "sonarExecuteScan", testCmd.Use, "command name incorrect")
|
|
|
|
}
|