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:
parent
e9a7590c5c
commit
d8d4f83fb4
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitCheckCVsCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitCheckCVsCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitCheckPVCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitCheckPVCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitCreateTargetVectorCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitCreateTargetVectorCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitPublishTargetVectorCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitPublishTargetVectorCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitRegisterPackagesCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitRegisterPackagesCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitReleasePackagesCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitReleasePackagesCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapAddonAssemblyKitReserveNextPackagesCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapAddonAssemblyKitReserveNextPackagesCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentAssemblePackagesCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentAssemblePackagesCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentCheckoutBranchCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentCheckoutBranchCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentCloneGitRepoCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentCloneGitRepoCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentCreateSystemCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentCreateSystemCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentPullGitRepoCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentPullGitRepoCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAbapEnvironmentRunATCCheckCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := AbapEnvironmentRunATCCheckCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestArtifactPrepareVersionCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := ArtifactPrepareVersionCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCheckmarxExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CheckmarxExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryCreateServiceKeyCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryCreateServiceKeyCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryCreateServiceCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryCreateServiceCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryCreateSpaceCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryCreateSpaceCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryDeleteServiceCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryDeleteServiceCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryDeleteSpaceCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryDeleteSpaceCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCloudFoundryDeployCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := CloudFoundryDeployCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestContainerSaveImageCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := ContainerSaveImageCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestDetectExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := DetectExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestFortifyExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := FortifyExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGctsCloneRepositoryCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GctsCloneRepositoryCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGctsCreateRepositoryCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GctsCreateRepositoryCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGctsDeployCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GctsDeployCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGctsExecuteABAPUnitTestsCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GctsExecuteABAPUnitTestsCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGctsRollbackCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GctsRollbackCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubCheckBranchProtectionCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubCheckBranchProtectionCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubCommentIssueCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubCommentIssueCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubCreateIssueCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubCreateIssueCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubCreatePullRequestCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubCreatePullRequestCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubPublishReleaseCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubPublishReleaseCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGithubSetCommitStatusCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GithubSetCommitStatusCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGitopsUpdateDeploymentCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := GitopsUpdateDeploymentCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHadolintExecuteCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := HadolintExecuteCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestJsonApplyPatchCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := JsonApplyPatchCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestKanikoExecuteCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := KanikoExecuteCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestKarmaExecuteTestsCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := KarmaExecuteTestsCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestKubernetesDeployCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := KubernetesDeployCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMalwareExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MalwareExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMavenBuildCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MavenBuildCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMavenExecuteIntegrationCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MavenExecuteIntegrationCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMavenExecuteStaticCodeChecksCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MavenExecuteStaticCodeChecksCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMavenExecuteCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MavenExecuteCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMtaBuildCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := MtaBuildCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNexusUploadCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := NexusUploadCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNpmExecuteLintCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := NpmExecuteLintCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNpmExecuteScriptsCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := NpmExecuteScriptsCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestProtecodeExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := ProtecodeExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSonarExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := SonarExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestVaultRotateSecretIdCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := VaultRotateSecretIdCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestWhitesourceExecuteScanCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := WhitesourceExecuteScanCommand()
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestXsDeployCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := XsDeployCommand()
|
||||
|
||||
|
@ -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{}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestTestStepCommand(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testCmd := TestStepCommand()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user