1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-11-28 08:49:44 +02:00

Unit test enhancement (#2471)

* Fixes parallelization in generated code

* Fixes test_code_generated.golden

* generate go code

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
Fabian Reh 2020-12-22 09:30:54 +01:00 committed by GitHub
parent e9a7590c5c
commit d8d4f83fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 59 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitCheckCVsCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitCheckCVsCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitCheckPVCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitCheckPVCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitCreateTargetVectorCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitCreateTargetVectorCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitPublishTargetVectorCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitPublishTargetVectorCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitRegisterPackagesCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitRegisterPackagesCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitReleasePackagesCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitReleasePackagesCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapAddonAssemblyKitReserveNextPackagesCommand(t *testing.T) {
t.Parallel()
testCmd := AbapAddonAssemblyKitReserveNextPackagesCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentAssemblePackagesCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentAssemblePackagesCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentCheckoutBranchCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentCheckoutBranchCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentCloneGitRepoCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentCloneGitRepoCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentCreateSystemCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentCreateSystemCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentPullGitRepoCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentPullGitRepoCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestAbapEnvironmentRunATCCheckCommand(t *testing.T) {
t.Parallel()
testCmd := AbapEnvironmentRunATCCheckCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestArtifactPrepareVersionCommand(t *testing.T) {
t.Parallel()
testCmd := ArtifactPrepareVersionCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCheckmarxExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := CheckmarxExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryCreateServiceKeyCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryCreateServiceKeyCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryCreateServiceCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryCreateServiceCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryCreateSpaceCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryCreateSpaceCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryDeleteServiceCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryDeleteServiceCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryDeleteSpaceCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryDeleteSpaceCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestCloudFoundryDeployCommand(t *testing.T) {
t.Parallel()
testCmd := CloudFoundryDeployCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestContainerSaveImageCommand(t *testing.T) {
t.Parallel()
testCmd := ContainerSaveImageCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestDetectExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := DetectExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestFortifyExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := FortifyExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGctsCloneRepositoryCommand(t *testing.T) {
t.Parallel()
testCmd := GctsCloneRepositoryCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGctsCreateRepositoryCommand(t *testing.T) {
t.Parallel()
testCmd := GctsCreateRepositoryCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGctsDeployCommand(t *testing.T) {
t.Parallel()
testCmd := GctsDeployCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGctsExecuteABAPUnitTestsCommand(t *testing.T) {
t.Parallel()
testCmd := GctsExecuteABAPUnitTestsCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGctsRollbackCommand(t *testing.T) {
t.Parallel()
testCmd := GctsRollbackCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubCheckBranchProtectionCommand(t *testing.T) {
t.Parallel()
testCmd := GithubCheckBranchProtectionCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubCommentIssueCommand(t *testing.T) {
t.Parallel()
testCmd := GithubCommentIssueCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubCreateIssueCommand(t *testing.T) {
t.Parallel()
testCmd := GithubCreateIssueCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubCreatePullRequestCommand(t *testing.T) {
t.Parallel()
testCmd := GithubCreatePullRequestCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubPublishReleaseCommand(t *testing.T) {
t.Parallel()
testCmd := GithubPublishReleaseCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGithubSetCommitStatusCommand(t *testing.T) {
t.Parallel()
testCmd := GithubSetCommitStatusCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestGitopsUpdateDeploymentCommand(t *testing.T) {
t.Parallel()
testCmd := GitopsUpdateDeploymentCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestHadolintExecuteCommand(t *testing.T) {
t.Parallel()
testCmd := HadolintExecuteCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestJsonApplyPatchCommand(t *testing.T) {
t.Parallel()
testCmd := JsonApplyPatchCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestKanikoExecuteCommand(t *testing.T) {
t.Parallel()
testCmd := KanikoExecuteCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestKarmaExecuteTestsCommand(t *testing.T) {
t.Parallel()
testCmd := KarmaExecuteTestsCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestKubernetesDeployCommand(t *testing.T) {
t.Parallel()
testCmd := KubernetesDeployCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMalwareExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := MalwareExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMavenBuildCommand(t *testing.T) {
t.Parallel()
testCmd := MavenBuildCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMavenExecuteIntegrationCommand(t *testing.T) {
t.Parallel()
testCmd := MavenExecuteIntegrationCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMavenExecuteStaticCodeChecksCommand(t *testing.T) {
t.Parallel()
testCmd := MavenExecuteStaticCodeChecksCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMavenExecuteCommand(t *testing.T) {
t.Parallel()
testCmd := MavenExecuteCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestMtaBuildCommand(t *testing.T) {
t.Parallel()
testCmd := MtaBuildCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestNexusUploadCommand(t *testing.T) {
t.Parallel()
testCmd := NexusUploadCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestNpmExecuteLintCommand(t *testing.T) {
t.Parallel()
testCmd := NpmExecuteLintCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestNpmExecuteScriptsCommand(t *testing.T) {
t.Parallel()
testCmd := NpmExecuteScriptsCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestProtecodeExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := ProtecodeExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestSonarExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := SonarExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestVaultRotateSecretIdCommand(t *testing.T) {
t.Parallel()
testCmd := VaultRotateSecretIdCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestWhitesourceExecuteScanCommand(t *testing.T) {
t.Parallel()
testCmd := WhitesourceExecuteScanCommand()

View File

@ -7,6 +7,7 @@ import (
)
func TestXsDeployCommand(t *testing.T) {
t.Parallel()
testCmd := XsDeployCommand()

View File

@ -242,6 +242,7 @@ import (
)
func Test{{.CobraCmdFuncName}}(t *testing.T) {
t.Parallel()
testCmd := {{.CobraCmdFuncName}}()
@ -355,6 +356,7 @@ func TestRun{{.StepName | title}}(t *testing.T) {
t.Parallel()
t.Run("happy path", func(t *testing.T) {
t.Parallel()
// init
config := {{.StepName}}Options{}
@ -369,6 +371,7 @@ func TestRun{{.StepName | title}}(t *testing.T) {
})
t.Run("error path", func(t *testing.T) {
t.Parallel()
// init
config := {{.StepName}}Options{}

View File

@ -7,6 +7,7 @@ import (
)
func TestTestStepCommand(t *testing.T) {
t.Parallel()
testCmd := TestStepCommand()