From ffc931aad1df71976b74233e58aefa2019a45ec9 Mon Sep 17 00:00:00 2001 From: Jk1484 <35270240+Jk1484@users.noreply.github.com> Date: Wed, 3 May 2023 21:02:11 +0500 Subject: [PATCH] feat(golangBuild): use 'unit' build tag to include tests during test execution (#4345) * Added unit tag as argument. Added description to runTests command. Changed code generator to have unit build tag in generated unit test files. * Added unit build tag to all unit test files. * added to new unit test unit build tag * Update verify-go.yml * small fix --------- Co-authored-by: Muhammadali Nazarov Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> --- .github/workflows/verify-go.yml | 2 +- cmd/abapAddonAssemblyKitCheckCVs_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitCheckCVs_test.go | 3 +++ cmd/abapAddonAssemblyKitCheckPV_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitCheckPV_test.go | 3 +++ ...pAddonAssemblyKitCreateTargetVector_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitCreateTargetVector_test.go | 3 +++ ...AddonAssemblyKitPublishTargetVector_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitPublishTargetVector_test.go | 3 +++ ...bapAddonAssemblyKitRegisterPackages_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitRegisterPackages_test.go | 3 +++ ...abapAddonAssemblyKitReleasePackages_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitReleasePackages_test.go | 3 +++ ...AddonAssemblyKitReserveNextPackages_generated_test.go | 3 +++ cmd/abapAddonAssemblyKitReserveNextPackages_test.go | 3 +++ cmd/abapEnvironmentAssembleConfirm_generated_test.go | 3 +++ cmd/abapEnvironmentAssembleConfirm_test.go | 3 +++ cmd/abapEnvironmentAssemblePackages_generated_test.go | 3 +++ cmd/abapEnvironmentAssemblePackages_test.go | 3 +++ cmd/abapEnvironmentBuild_generated_test.go | 3 +++ cmd/abapEnvironmentBuild_test.go | 3 +++ cmd/abapEnvironmentCheckoutBranch_generated_test.go | 3 +++ cmd/abapEnvironmentCheckoutBranch_test.go | 3 +++ cmd/abapEnvironmentCloneGitRepo_generated_test.go | 3 +++ cmd/abapEnvironmentCloneGitRepo_test.go | 3 +++ cmd/abapEnvironmentCreateSystem_generated_test.go | 3 +++ cmd/abapEnvironmentCreateSystem_test.go | 3 +++ cmd/abapEnvironmentCreateTag_generated_test.go | 3 +++ cmd/abapEnvironmentCreateTag_test.go | 3 +++ cmd/abapEnvironmentPullGitRepo_generated_test.go | 3 +++ cmd/abapEnvironmentPullGitRepo_test.go | 3 +++ cmd/abapEnvironmentPushATCSystemConfig_generated_test.go | 3 +++ cmd/abapEnvironmentPushATCSystemConfig_test.go | 3 +++ cmd/abapEnvironmentRunATCCheck_generated_test.go | 3 +++ cmd/abapEnvironmentRunATCCheck_test.go | 3 +++ cmd/abapEnvironmentRunAUnitTest_generated_test.go | 3 +++ cmd/abapEnvironmentRunAUnitTest_test.go | 3 +++ cmd/ansSendEvent_generated_test.go | 3 +++ cmd/ansSendEvent_test.go | 3 +++ cmd/apiKeyValueMapDownload_generated_test.go | 3 +++ cmd/apiKeyValueMapDownload_test.go | 3 +++ cmd/apiKeyValueMapUpload_generated_test.go | 3 +++ cmd/apiKeyValueMapUpload_test.go | 3 +++ cmd/apiProviderDownload_generated_test.go | 3 +++ cmd/apiProviderDownload_test.go | 3 +++ cmd/apiProviderList_generated_test.go | 3 +++ cmd/apiProviderList_test.go | 3 +++ cmd/apiProviderUpload_generated_test.go | 3 +++ cmd/apiProviderUpload_test.go | 3 +++ cmd/apiProxyDownload_generated_test.go | 3 +++ cmd/apiProxyDownload_test.go | 3 +++ cmd/apiProxyList_generated_test.go | 3 +++ cmd/apiProxyList_test.go | 3 +++ cmd/apiProxyUpload_generated_test.go | 3 +++ cmd/apiProxyUpload_test.go | 3 +++ cmd/artifactPrepareVersion_generated_test.go | 3 +++ cmd/artifactPrepareVersion_test.go | 3 +++ cmd/ascAppUpload_generated_test.go | 3 +++ cmd/ascAppUpload_test.go | 3 +++ cmd/awsS3Upload_generated_test.go | 3 +++ cmd/awsS3Upload_test.go | 3 +++ cmd/azureBlobUpload_generated_test.go | 3 +++ cmd/azureBlobUpload_test.go | 3 +++ cmd/batsExecuteTests_generated_test.go | 3 +++ cmd/batsExecuteTests_test.go | 3 +++ cmd/checkIfStepActive_test.go | 3 +++ cmd/checkmarxExecuteScan_generated_test.go | 3 +++ cmd/checkmarxExecuteScan_test.go | 3 +++ cmd/cloudFoundryCreateServiceKey_generated_test.go | 3 +++ cmd/cloudFoundryCreateServiceKey_test.go | 3 +++ cmd/cloudFoundryCreateService_generated_test.go | 3 +++ cmd/cloudFoundryCreateService_test.go | 3 +++ cmd/cloudFoundryCreateSpace_generated_test.go | 3 +++ cmd/cloudFoundryCreateSpace_test.go | 3 +++ cmd/cloudFoundryDeleteService_generated_test.go | 3 +++ cmd/cloudFoundryDeleteService_test.go | 3 +++ cmd/cloudFoundryDeleteSpace_generated_test.go | 3 +++ cmd/cloudFoundryDeleteSpace_test.go | 3 +++ cmd/cloudFoundryDeploy_generated_test.go | 3 +++ cmd/cloudFoundryDeploy_test.go | 3 +++ cmd/cnbBuild_generated_test.go | 3 +++ cmd/cnbBuild_test.go | 3 +++ cmd/codeqlExecuteScan_generated_test.go | 3 +++ cmd/codeqlExecuteScan_test.go | 3 +++ cmd/containerExecuteStructureTests_generated_test.go | 3 +++ cmd/containerExecuteStructureTests_test.go | 3 +++ cmd/containerSaveImage_generated_test.go | 3 +++ cmd/containerSaveImage_test.go | 3 +++ cmd/credentialdiggerScan_generated_test.go | 3 +++ cmd/credentialdiggerScan_test.go | 3 +++ cmd/detectExecuteScan_generated_test.go | 3 +++ cmd/detectExecuteScan_test.go | 3 +++ cmd/fortifyExecuteScan_generated_test.go | 3 +++ cmd/fortifyExecuteScan_test.go | 3 +++ cmd/gaugeExecuteTests_generated_test.go | 3 +++ cmd/gaugeExecuteTests_test.go | 3 +++ cmd/gctsCloneRepository_generated_test.go | 3 +++ cmd/gctsCloneRepository_test.go | 3 +++ cmd/gctsCreateRepository_generated_test.go | 3 +++ cmd/gctsCreateRepository_test.go | 3 +++ cmd/gctsDeploy_generated_test.go | 3 +++ cmd/gctsDeploy_test.go | 3 +++ cmd/gctsExecuteABAPQualityChecks_generated_test.go | 3 +++ cmd/gctsExecuteABAPQualityChecks_test.go | 3 +++ cmd/gctsExecuteABAPUnitTests_generated_test.go | 3 +++ cmd/gctsExecuteABAPUnitTests_test.go | 3 +++ cmd/gctsRollback_generated_test.go | 3 +++ cmd/gctsRollback_test.go | 3 +++ cmd/getConfig_test.go | 3 +++ cmd/getDefaults_test.go | 3 +++ cmd/githubCheckBranchProtection_generated_test.go | 3 +++ cmd/githubCheckBranchProtection_test.go | 3 +++ cmd/githubCommentIssue_generated_test.go | 3 +++ cmd/githubCommentIssue_test.go | 3 +++ cmd/githubCreateIssue_generated_test.go | 3 +++ cmd/githubCreateIssue_test.go | 3 +++ cmd/githubCreatePullRequest_generated_test.go | 3 +++ cmd/githubCreatePullRequest_test.go | 3 +++ cmd/githubPublishRelease_generated_test.go | 3 +++ cmd/githubPublishRelease_test.go | 3 +++ cmd/githubSetCommitStatus_generated_test.go | 3 +++ cmd/githubSetCommitStatus_test.go | 3 +++ cmd/gitopsUpdateDeployment_generated_test.go | 3 +++ cmd/gitopsUpdateDeployment_test.go | 3 +++ cmd/golangBuild.go | 2 +- cmd/golangBuild_generated.go | 2 +- cmd/golangBuild_generated_test.go | 3 +++ cmd/golangBuild_test.go | 9 ++++++--- cmd/gradleExecuteBuild_generated_test.go | 3 +++ cmd/gradleExecuteBuild_test.go | 3 +++ cmd/hadolintExecute_generated_test.go | 3 +++ cmd/hadolintExecute_test.go | 3 +++ cmd/helmExecute_generated_test.go | 3 +++ cmd/helmExecute_test.go | 3 +++ cmd/influxWriteData_generated_test.go | 3 +++ cmd/influxWriteData_test.go | 3 +++ cmd/integrationArtifactDeploy_generated_test.go | 3 +++ cmd/integrationArtifactDeploy_test.go | 3 +++ cmd/integrationArtifactDownload_generated_test.go | 3 +++ cmd/integrationArtifactDownload_test.go | 3 +++ cmd/integrationArtifactGetMplStatus_generated_test.go | 3 +++ cmd/integrationArtifactGetMplStatus_test.go | 3 +++ ...tegrationArtifactGetServiceEndpoint_generated_test.go | 3 +++ cmd/integrationArtifactGetServiceEndpoint_test.go | 3 +++ cmd/integrationArtifactResource_generated_test.go | 3 +++ cmd/integrationArtifactResource_test.go | 3 +++ cmd/integrationArtifactTransport_generated_test.go | 3 +++ cmd/integrationArtifactTransport_test.go | 3 +++ ...ationArtifactTriggerIntegrationTest_generated_test.go | 3 +++ cmd/integrationArtifactTriggerIntegrationTest_test.go | 3 +++ cmd/integrationArtifactUnDeploy_generated_test.go | 3 +++ cmd/integrationArtifactUnDeploy_test.go | 3 +++ ...egrationArtifactUpdateConfiguration_generated_test.go | 3 +++ cmd/integrationArtifactUpdateConfiguration_test.go | 3 +++ cmd/integrationArtifactUpload_generated_test.go | 3 +++ cmd/integrationArtifactUpload_test.go | 3 +++ cmd/isChangeInDevelopment_generated_test.go | 3 +++ cmd/isChangeInDevelopment_test.go | 3 +++ cmd/jsonApplyPatch_generated_test.go | 3 +++ cmd/jsonApplyPatch_test.go | 3 +++ cmd/kanikoExecute_generated_test.go | 3 +++ cmd/kanikoExecute_test.go | 3 +++ cmd/karmaExecuteTests_generated_test.go | 3 +++ cmd/karmaExecuteTests_test.go | 3 +++ cmd/kubernetesDeploy_generated_test.go | 3 +++ cmd/kubernetesDeploy_test.go | 3 +++ cmd/malwareExecuteScan_generated_test.go | 3 +++ cmd/malwareExecuteScan_test.go | 3 +++ cmd/mavenBuild_generated_test.go | 3 +++ cmd/mavenBuild_test.go | 3 +++ cmd/mavenExecuteIntegration_generated_test.go | 3 +++ cmd/mavenExecuteIntegration_test.go | 3 +++ cmd/mavenExecuteStaticCodeChecks_generated_test.go | 3 +++ cmd/mavenExecuteStaticCodeChecks_test.go | 3 +++ cmd/mavenExecute_generated_test.go | 3 +++ cmd/mavenExecute_test.go | 3 +++ cmd/mtaBuild_generated_test.go | 3 +++ cmd/mtaBuild_test.go | 3 +++ cmd/newmanExecute_generated_test.go | 3 +++ cmd/newmanExecute_test.go | 3 +++ cmd/nexusUpload_generated_test.go | 3 +++ cmd/nexusUpload_test.go | 3 +++ cmd/npmExecuteLint_generated_test.go | 3 +++ cmd/npmExecuteLint_test.go | 3 +++ cmd/npmExecuteScripts_generated_test.go | 3 +++ cmd/npmExecuteScripts_test.go | 3 +++ cmd/pipelineCreateScanSummary_generated_test.go | 3 +++ cmd/pipelineCreateScanSummary_test.go | 3 +++ cmd/piper_test.go | 3 +++ cmd/protecodeExecuteScan_generated_test.go | 3 +++ cmd/protecodeExecuteScan_test.go | 3 +++ cmd/pythonBuild_generated_test.go | 3 +++ cmd/pythonBuild_test.go | 3 +++ cmd/shellExecute_generated_test.go | 3 +++ cmd/shellExecute_test.go | 3 +++ cmd/sonarExecuteScan_generated_test.go | 3 +++ cmd/sonarExecuteScan_test.go | 3 +++ cmd/terraformExecute_generated_test.go | 3 +++ cmd/terraformExecute_test.go | 3 +++ cmd/tmsExport_generated_test.go | 3 +++ cmd/tmsExport_test.go | 3 +++ cmd/tmsUpload_generated_test.go | 3 +++ cmd/tmsUpload_test.go | 3 +++ cmd/transportRequestDocIDFromGit_generated_test.go | 3 +++ cmd/transportRequestDocIDFromGit_test.go | 3 +++ cmd/transportRequestReqIDFromGit_generated_test.go | 3 +++ cmd/transportRequestReqIDFromGit_test.go | 3 +++ cmd/transportRequestUploadCTS_generated_test.go | 3 +++ cmd/transportRequestUploadCTS_test.go | 3 +++ cmd/transportRequestUploadRFC_generated_test.go | 3 +++ cmd/transportRequestUploadRFC_test.go | 3 +++ cmd/transportRequestUploadSOLMAN_generated_test.go | 3 +++ cmd/transportRequestUploadSOLMAN_test.go | 3 +++ cmd/uiVeri5ExecuteTests_generated_test.go | 3 +++ cmd/uiVeri5ExecuteTests_test.go | 3 +++ cmd/vaultRotateSecretId_generated_test.go | 3 +++ cmd/vaultRotateSecretId_test.go | 3 +++ cmd/version_test.go | 3 +++ cmd/whitesourceExecuteScan_generated_test.go | 3 +++ cmd/whitesourceExecuteScan_test.go | 3 +++ cmd/xsDeploy_generated_test.go | 3 +++ cmd/xsDeploy_test.go | 3 +++ integration/contracts_test.go | 3 +++ integration/integration_golang_test.go | 6 +++--- pkg/abap/aakaas/componentVersion_test.go | 3 +++ pkg/abap/aakaas/productVersion_test.go | 3 +++ pkg/abap/aakaas/targetVector_test.go | 3 +++ pkg/abap/aakaas/versionables_test.go | 3 +++ pkg/abap/build/bfw_test.go | 3 +++ pkg/abap/build/connector_test.go | 3 +++ pkg/abaputils/abaputils_test.go | 3 +++ pkg/abaputils/descriptor_test.go | 3 +++ pkg/abaputils/manageGitRepositoryUtils_test.go | 3 +++ pkg/ado/ado_test.go | 3 +++ pkg/ans/ans_test.go | 3 +++ pkg/ans/event_test.go | 3 +++ pkg/apim/APIMUtility_test.go | 3 +++ pkg/blackduck/blackduck_test.go | 3 +++ pkg/blackduck/reporting_test.go | 3 +++ pkg/buildsettings/buildSettings_test.go | 3 +++ pkg/certutils/certutils_test.go | 3 +++ pkg/checkmarx/checkmarx_test.go | 3 +++ pkg/checkmarx/cxxml_to_sarif_test.go | 3 +++ pkg/checkmarx/reporting_test.go | 3 +++ pkg/cloudfoundry/CloudFoundry_test.go | 3 +++ pkg/cloudfoundry/ManifestUtils_test.go | 3 +++ pkg/cloudfoundry/Vars_test.go | 3 +++ pkg/cnbutils/auth_test.go | 3 +++ pkg/cnbutils/bindings/bindings_test.go | 3 +++ pkg/cnbutils/buildpack_test.go | 3 +++ pkg/cnbutils/copy_project_test.go | 3 +++ pkg/cnbutils/env_test.go | 3 +++ pkg/cnbutils/order_test.go | 3 +++ pkg/cnbutils/privacy/privacy_test.go | 3 +++ pkg/cnbutils/project/descriptor_test.go | 3 +++ pkg/cnbutils/project/metadata/metadata_test.go | 3 +++ pkg/cnbutils/project/resolve_path_test.go | 3 +++ pkg/cnbutils/registry/search_test.go | 3 +++ pkg/cnbutils/report_test.go | 3 +++ pkg/cnbutils/target_image_test.go | 3 +++ pkg/codeql/codeql_test.go | 3 +++ pkg/command/command_test.go | 3 +++ pkg/config/config_test.go | 3 +++ pkg/config/defaults_test.go | 3 +++ pkg/config/errors_test.go | 3 +++ pkg/config/evaluation_test.go | 3 +++ pkg/config/flags_test.go | 3 +++ pkg/config/interpolation/interpolation_test.go | 3 +++ pkg/config/reporting_test.go | 3 +++ pkg/config/run_test.go | 3 +++ pkg/config/stepmeta_test.go | 3 +++ pkg/config/validation/validation_test.go | 3 +++ pkg/config/vault_test.go | 3 +++ pkg/cpi/commonUtils_test.go | 3 +++ pkg/docker/container_test.go | 3 +++ pkg/docker/docker_test.go | 3 +++ pkg/docker/multiarch_test.go | 3 +++ pkg/documentation/generator/defaults_test.go | 3 +++ pkg/documentation/generator/description_test.go | 3 +++ pkg/documentation/generator/main_test.go | 3 +++ pkg/documentation/generator/metadata_test.go | 3 +++ pkg/documentation/generator/outputs_test.go | 3 +++ pkg/documentation/generator/parameters_test.go | 3 +++ pkg/fortify/fortify_test.go | 3 +++ pkg/fortify/fpr_to_sarif_test.go | 3 +++ pkg/gcs/gcsClient_test.go | 3 +++ pkg/gcs/reporting_test.go | 3 +++ pkg/gcs/targetFolderHandler_test.go | 3 +++ pkg/generator/helper/helper.go | 5 ++++- pkg/generator/helper/helper_test.go | 3 +++ pkg/generator/helper/resources_test.go | 3 +++ .../TestProcessMetaFiles/test_code_generated.golden | 3 +++ pkg/git/git_test.go | 3 +++ pkg/github/github_test.go | 3 +++ pkg/github/secret_test.go | 3 +++ pkg/goget/goget_test.go | 3 +++ pkg/gradle/gradle_test.go | 3 +++ pkg/http/downloader_test.go | 3 +++ pkg/http/http_test.go | 3 +++ pkg/influx/client_test.go | 3 +++ pkg/java/keytool_test.go | 3 +++ pkg/jenkins/build_test.go | 3 +++ pkg/jenkins/credential_test.go | 3 +++ pkg/jenkins/jenkins_test.go | 3 +++ pkg/kubernetes/helm_test.go | 3 +++ pkg/kubernetes/utils_test.go | 3 +++ pkg/log/ansHook_test.go | 3 +++ pkg/log/collectorHook_test.go | 3 +++ pkg/log/errors_test.go | 3 +++ pkg/log/fatalHook_test.go | 3 +++ pkg/log/log_test.go | 3 +++ pkg/log/sentryHook_test.go | 3 +++ pkg/log/writer_test.go | 3 +++ pkg/malwarescan/malwarescan_test.go | 3 +++ pkg/maven/maven_test.go | 3 +++ pkg/maven/model_test.go | 3 +++ pkg/maven/settings_test.go | 3 +++ pkg/mock/dockerRunner_test.go | 3 +++ pkg/mock/example_dockerRunner_test.go | 3 +++ pkg/mock/fileUtils_test.go | 3 +++ pkg/mock/httpClient_test.go | 4 ++-- pkg/multiarch/multiarch_test.go | 3 +++ pkg/nexus/nexus_test.go | 3 +++ pkg/npm/config_test.go | 3 +++ pkg/npm/npm_test.go | 3 +++ pkg/npm/publish_test.go | 3 +++ pkg/orchestrator/azureDevOps_test.go | 3 +++ pkg/orchestrator/gitHubActions_test.go | 3 +++ pkg/orchestrator/jenkins_test.go | 3 +++ pkg/orchestrator/orchestrator_test.go | 3 +++ pkg/orchestrator/testUtils_test.go | 3 +++ pkg/orchestrator/unknownOrchestrator_test.go | 3 +++ pkg/piperenv/CPEMap_test.go | 3 +++ pkg/piperenv/artifact_test.go | 3 +++ pkg/piperenv/environment_test.go | 3 +++ pkg/piperenv/templating_test.go | 3 +++ pkg/piperutils/credentials_test.go | 3 +++ pkg/piperutils/fileUtils_test.go | 3 +++ pkg/piperutils/ioUtils_test.go | 3 +++ pkg/piperutils/maps_test.go | 3 +++ pkg/piperutils/projectStructure_test.go | 3 +++ pkg/piperutils/slices_test.go | 3 +++ pkg/piperutils/stepResults_test.go | 3 +++ pkg/piperutils/strings_test.go | 3 +++ pkg/piperutils/templateUtils_test.go | 3 +++ pkg/protecode/analysis_test.go | 3 +++ pkg/protecode/protecode_test.go | 3 +++ pkg/protecode/report_test.go | 3 +++ pkg/reporting/github_test.go | 3 +++ pkg/reporting/policyViolation_test.go | 3 +++ pkg/reporting/pullRequestReport_test.go | 3 +++ pkg/reporting/reporting_test.go | 3 +++ pkg/reporting/securityVulnerability_test.go | 3 +++ pkg/sonar/client_test.go | 3 +++ pkg/sonar/componentService_test.go | 3 +++ pkg/sonar/issueService_test.go | 3 +++ pkg/sonar/report_test.go | 3 +++ pkg/sonar/sonar_test.go | 3 +++ pkg/sonar/taskService_test.go | 3 +++ pkg/splunk/splunk_test.go | 3 +++ pkg/syft/syft_test.go | 3 +++ pkg/telemetry/data_test.go | 3 +++ pkg/telemetry/telemetry_test.go | 3 +++ pkg/terraform/terraform_test.go | 3 +++ pkg/tms/tmsClient_test.go | 3 +++ pkg/toolrecord/toolrecord_test.go | 3 +++ pkg/transportrequest/cts/upload_test.go | 3 +++ pkg/transportrequest/gitutils_test.go | 3 +++ pkg/transportrequest/rfc/upload_test.go | 3 +++ pkg/transportrequest/solman/create_test.go | 3 +++ pkg/transportrequest/solman/upload_test.go | 3 +++ pkg/validation/validation_test.go | 3 +++ pkg/vault/client_test.go | 3 +++ pkg/versioning/descriptorUtils_test.go | 3 +++ pkg/versioning/docker_test.go | 3 +++ pkg/versioning/gradle_test.go | 3 +++ pkg/versioning/helm_test.go | 3 +++ pkg/versioning/inifile_test.go | 3 +++ pkg/versioning/jsonfile_test.go | 3 +++ pkg/versioning/maven_test.go | 3 +++ pkg/versioning/pip_test.go | 3 +++ pkg/versioning/properties_test.go | 3 +++ pkg/versioning/versionfile_test.go | 3 +++ pkg/versioning/versioningModel_test.go | 3 +++ pkg/versioning/versioning_test.go | 3 +++ pkg/versioning/yamlfile_test.go | 3 +++ pkg/whitesource/configHelper_test.go | 3 +++ pkg/whitesource/reporting_test.go | 3 +++ pkg/whitesource/scanMTA_test.go | 3 +++ pkg/whitesource/scanMaven_test.go | 3 +++ pkg/whitesource/scanNPM_test.go | 3 +++ pkg/whitesource/scanPolling_test.go | 3 +++ pkg/whitesource/scanReports_test.go | 3 +++ pkg/whitesource/scanUA_test.go | 3 +++ pkg/whitesource/scan_test.go | 3 +++ pkg/whitesource/whitesource_test.go | 3 +++ pkg/xsuaa/xsuaa_test.go | 3 +++ pkg/yaml/yamlUtil_test.go | 3 +++ resources/metadata/golangBuild.yaml | 2 +- 399 files changed, 1192 insertions(+), 13 deletions(-) diff --git a/.github/workflows/verify-go.yml b/.github/workflows/verify-go.yml index 6475eeb1d..82798a4f2 100644 --- a/.github/workflows/verify-go.yml +++ b/.github/workflows/verify-go.yml @@ -30,7 +30,7 @@ jobs: env: CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} with: - coverageCommand: go test ./... -coverprofile cover.out + coverageCommand: go test -tags=unit ./... -coverprofile cover.out coverageLocations: cover.out:gocov # truncate package name from file paths in report prefix: github.com/SAP/jenkins-library/ diff --git a/cmd/abapAddonAssemblyKitCheckCVs_generated_test.go b/cmd/abapAddonAssemblyKitCheckCVs_generated_test.go index a1206bf68..9abf4c317 100644 --- a/cmd/abapAddonAssemblyKitCheckCVs_generated_test.go +++ b/cmd/abapAddonAssemblyKitCheckCVs_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitCheckCVs_test.go b/cmd/abapAddonAssemblyKitCheckCVs_test.go index 375987449..ce1c20eb1 100644 --- a/cmd/abapAddonAssemblyKitCheckCVs_test.go +++ b/cmd/abapAddonAssemblyKitCheckCVs_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitCheckPV_generated_test.go b/cmd/abapAddonAssemblyKitCheckPV_generated_test.go index 3c5c5fed0..f16c8583c 100644 --- a/cmd/abapAddonAssemblyKitCheckPV_generated_test.go +++ b/cmd/abapAddonAssemblyKitCheckPV_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitCheckPV_test.go b/cmd/abapAddonAssemblyKitCheckPV_test.go index 0b31e0e03..a8d2dc567 100644 --- a/cmd/abapAddonAssemblyKitCheckPV_test.go +++ b/cmd/abapAddonAssemblyKitCheckPV_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitCreateTargetVector_generated_test.go b/cmd/abapAddonAssemblyKitCreateTargetVector_generated_test.go index 2e1e0a2b4..49dfbd65e 100644 --- a/cmd/abapAddonAssemblyKitCreateTargetVector_generated_test.go +++ b/cmd/abapAddonAssemblyKitCreateTargetVector_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitCreateTargetVector_test.go b/cmd/abapAddonAssemblyKitCreateTargetVector_test.go index 3b1114375..c63b47338 100644 --- a/cmd/abapAddonAssemblyKitCreateTargetVector_test.go +++ b/cmd/abapAddonAssemblyKitCreateTargetVector_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitPublishTargetVector_generated_test.go b/cmd/abapAddonAssemblyKitPublishTargetVector_generated_test.go index 5badab458..4042917a2 100644 --- a/cmd/abapAddonAssemblyKitPublishTargetVector_generated_test.go +++ b/cmd/abapAddonAssemblyKitPublishTargetVector_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitPublishTargetVector_test.go b/cmd/abapAddonAssemblyKitPublishTargetVector_test.go index 9441bfdb1..176216cc2 100644 --- a/cmd/abapAddonAssemblyKitPublishTargetVector_test.go +++ b/cmd/abapAddonAssemblyKitPublishTargetVector_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitRegisterPackages_generated_test.go b/cmd/abapAddonAssemblyKitRegisterPackages_generated_test.go index 5ec113141..7303a33f2 100644 --- a/cmd/abapAddonAssemblyKitRegisterPackages_generated_test.go +++ b/cmd/abapAddonAssemblyKitRegisterPackages_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitRegisterPackages_test.go b/cmd/abapAddonAssemblyKitRegisterPackages_test.go index e77dbc9cb..67c6f4432 100644 --- a/cmd/abapAddonAssemblyKitRegisterPackages_test.go +++ b/cmd/abapAddonAssemblyKitRegisterPackages_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitReleasePackages_generated_test.go b/cmd/abapAddonAssemblyKitReleasePackages_generated_test.go index aa356c8c8..3dfc4f4a9 100644 --- a/cmd/abapAddonAssemblyKitReleasePackages_generated_test.go +++ b/cmd/abapAddonAssemblyKitReleasePackages_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitReleasePackages_test.go b/cmd/abapAddonAssemblyKitReleasePackages_test.go index da25c5ad5..2174deb04 100644 --- a/cmd/abapAddonAssemblyKitReleasePackages_test.go +++ b/cmd/abapAddonAssemblyKitReleasePackages_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitReserveNextPackages_generated_test.go b/cmd/abapAddonAssemblyKitReserveNextPackages_generated_test.go index e632fb5a0..4c8ed5bf6 100644 --- a/cmd/abapAddonAssemblyKitReserveNextPackages_generated_test.go +++ b/cmd/abapAddonAssemblyKitReserveNextPackages_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapAddonAssemblyKitReserveNextPackages_test.go b/cmd/abapAddonAssemblyKitReserveNextPackages_test.go index c874925a2..577b808c3 100644 --- a/cmd/abapAddonAssemblyKitReserveNextPackages_test.go +++ b/cmd/abapAddonAssemblyKitReserveNextPackages_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentAssembleConfirm_generated_test.go b/cmd/abapEnvironmentAssembleConfirm_generated_test.go index a030a56ce..3cc60b409 100644 --- a/cmd/abapEnvironmentAssembleConfirm_generated_test.go +++ b/cmd/abapEnvironmentAssembleConfirm_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentAssembleConfirm_test.go b/cmd/abapEnvironmentAssembleConfirm_test.go index f839ec312..885cd4190 100644 --- a/cmd/abapEnvironmentAssembleConfirm_test.go +++ b/cmd/abapEnvironmentAssembleConfirm_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentAssemblePackages_generated_test.go b/cmd/abapEnvironmentAssemblePackages_generated_test.go index 86da5ea7e..f61a3dcc1 100644 --- a/cmd/abapEnvironmentAssemblePackages_generated_test.go +++ b/cmd/abapEnvironmentAssemblePackages_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentAssemblePackages_test.go b/cmd/abapEnvironmentAssemblePackages_test.go index 82fc79db9..201a3109a 100644 --- a/cmd/abapEnvironmentAssemblePackages_test.go +++ b/cmd/abapEnvironmentAssemblePackages_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentBuild_generated_test.go b/cmd/abapEnvironmentBuild_generated_test.go index 402229af3..bec4d70b6 100644 --- a/cmd/abapEnvironmentBuild_generated_test.go +++ b/cmd/abapEnvironmentBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentBuild_test.go b/cmd/abapEnvironmentBuild_test.go index 0b3ba813f..cd969e2bc 100644 --- a/cmd/abapEnvironmentBuild_test.go +++ b/cmd/abapEnvironmentBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCheckoutBranch_generated_test.go b/cmd/abapEnvironmentCheckoutBranch_generated_test.go index 7614570db..222a48f34 100644 --- a/cmd/abapEnvironmentCheckoutBranch_generated_test.go +++ b/cmd/abapEnvironmentCheckoutBranch_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCheckoutBranch_test.go b/cmd/abapEnvironmentCheckoutBranch_test.go index abbf23e20..5accac17c 100644 --- a/cmd/abapEnvironmentCheckoutBranch_test.go +++ b/cmd/abapEnvironmentCheckoutBranch_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCloneGitRepo_generated_test.go b/cmd/abapEnvironmentCloneGitRepo_generated_test.go index 3e661854a..b02bddddd 100644 --- a/cmd/abapEnvironmentCloneGitRepo_generated_test.go +++ b/cmd/abapEnvironmentCloneGitRepo_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCloneGitRepo_test.go b/cmd/abapEnvironmentCloneGitRepo_test.go index 9f3b2c3bc..925628dda 100644 --- a/cmd/abapEnvironmentCloneGitRepo_test.go +++ b/cmd/abapEnvironmentCloneGitRepo_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCreateSystem_generated_test.go b/cmd/abapEnvironmentCreateSystem_generated_test.go index da7c798a7..a348bb212 100644 --- a/cmd/abapEnvironmentCreateSystem_generated_test.go +++ b/cmd/abapEnvironmentCreateSystem_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCreateSystem_test.go b/cmd/abapEnvironmentCreateSystem_test.go index ef9c14673..29be86f3b 100644 --- a/cmd/abapEnvironmentCreateSystem_test.go +++ b/cmd/abapEnvironmentCreateSystem_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCreateTag_generated_test.go b/cmd/abapEnvironmentCreateTag_generated_test.go index 57ab00718..0c3e19bf9 100644 --- a/cmd/abapEnvironmentCreateTag_generated_test.go +++ b/cmd/abapEnvironmentCreateTag_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentCreateTag_test.go b/cmd/abapEnvironmentCreateTag_test.go index 15589a14a..1241d3639 100644 --- a/cmd/abapEnvironmentCreateTag_test.go +++ b/cmd/abapEnvironmentCreateTag_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentPullGitRepo_generated_test.go b/cmd/abapEnvironmentPullGitRepo_generated_test.go index 4c9d0935e..d325b614b 100644 --- a/cmd/abapEnvironmentPullGitRepo_generated_test.go +++ b/cmd/abapEnvironmentPullGitRepo_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentPullGitRepo_test.go b/cmd/abapEnvironmentPullGitRepo_test.go index 3aad4e761..c65be1942 100644 --- a/cmd/abapEnvironmentPullGitRepo_test.go +++ b/cmd/abapEnvironmentPullGitRepo_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentPushATCSystemConfig_generated_test.go b/cmd/abapEnvironmentPushATCSystemConfig_generated_test.go index 24d38f802..b0d94160c 100644 --- a/cmd/abapEnvironmentPushATCSystemConfig_generated_test.go +++ b/cmd/abapEnvironmentPushATCSystemConfig_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentPushATCSystemConfig_test.go b/cmd/abapEnvironmentPushATCSystemConfig_test.go index 6d14e694d..66c6c7d65 100644 --- a/cmd/abapEnvironmentPushATCSystemConfig_test.go +++ b/cmd/abapEnvironmentPushATCSystemConfig_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentRunATCCheck_generated_test.go b/cmd/abapEnvironmentRunATCCheck_generated_test.go index 609790434..cde4fc244 100644 --- a/cmd/abapEnvironmentRunATCCheck_generated_test.go +++ b/cmd/abapEnvironmentRunATCCheck_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentRunATCCheck_test.go b/cmd/abapEnvironmentRunATCCheck_test.go index 3ddee24c3..f7a69d4cf 100644 --- a/cmd/abapEnvironmentRunATCCheck_test.go +++ b/cmd/abapEnvironmentRunATCCheck_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentRunAUnitTest_generated_test.go b/cmd/abapEnvironmentRunAUnitTest_generated_test.go index 66f6930d4..6c2b0112b 100644 --- a/cmd/abapEnvironmentRunAUnitTest_generated_test.go +++ b/cmd/abapEnvironmentRunAUnitTest_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/abapEnvironmentRunAUnitTest_test.go b/cmd/abapEnvironmentRunAUnitTest_test.go index f04500d84..4c1be6c9e 100644 --- a/cmd/abapEnvironmentRunAUnitTest_test.go +++ b/cmd/abapEnvironmentRunAUnitTest_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/ansSendEvent_generated_test.go b/cmd/ansSendEvent_generated_test.go index 4c3cd8209..351300237 100644 --- a/cmd/ansSendEvent_generated_test.go +++ b/cmd/ansSendEvent_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/ansSendEvent_test.go b/cmd/ansSendEvent_test.go index e41f43fb5..027acd343 100644 --- a/cmd/ansSendEvent_test.go +++ b/cmd/ansSendEvent_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiKeyValueMapDownload_generated_test.go b/cmd/apiKeyValueMapDownload_generated_test.go index de1dd047e..6232c8e95 100644 --- a/cmd/apiKeyValueMapDownload_generated_test.go +++ b/cmd/apiKeyValueMapDownload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiKeyValueMapDownload_test.go b/cmd/apiKeyValueMapDownload_test.go index a5419db41..07ca9a95e 100644 --- a/cmd/apiKeyValueMapDownload_test.go +++ b/cmd/apiKeyValueMapDownload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiKeyValueMapUpload_generated_test.go b/cmd/apiKeyValueMapUpload_generated_test.go index f4664a795..e16af47fd 100644 --- a/cmd/apiKeyValueMapUpload_generated_test.go +++ b/cmd/apiKeyValueMapUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiKeyValueMapUpload_test.go b/cmd/apiKeyValueMapUpload_test.go index 4a6d7a1f8..ae2d96b3f 100644 --- a/cmd/apiKeyValueMapUpload_test.go +++ b/cmd/apiKeyValueMapUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderDownload_generated_test.go b/cmd/apiProviderDownload_generated_test.go index 0d63ee19a..648b9f7b6 100644 --- a/cmd/apiProviderDownload_generated_test.go +++ b/cmd/apiProviderDownload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderDownload_test.go b/cmd/apiProviderDownload_test.go index fdbe0d3e9..29feecb30 100644 --- a/cmd/apiProviderDownload_test.go +++ b/cmd/apiProviderDownload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderList_generated_test.go b/cmd/apiProviderList_generated_test.go index f6eaf0604..3ac587157 100644 --- a/cmd/apiProviderList_generated_test.go +++ b/cmd/apiProviderList_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderList_test.go b/cmd/apiProviderList_test.go index 2fac1f6bd..717c52748 100644 --- a/cmd/apiProviderList_test.go +++ b/cmd/apiProviderList_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderUpload_generated_test.go b/cmd/apiProviderUpload_generated_test.go index c8b74c77a..21d4fb961 100644 --- a/cmd/apiProviderUpload_generated_test.go +++ b/cmd/apiProviderUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProviderUpload_test.go b/cmd/apiProviderUpload_test.go index d27807114..5a14fce92 100644 --- a/cmd/apiProviderUpload_test.go +++ b/cmd/apiProviderUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyDownload_generated_test.go b/cmd/apiProxyDownload_generated_test.go index 46bdf0d90..4eb68be7c 100644 --- a/cmd/apiProxyDownload_generated_test.go +++ b/cmd/apiProxyDownload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyDownload_test.go b/cmd/apiProxyDownload_test.go index e1eb836b1..b788c98ad 100644 --- a/cmd/apiProxyDownload_test.go +++ b/cmd/apiProxyDownload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyList_generated_test.go b/cmd/apiProxyList_generated_test.go index 78ef2b26b..cf039af95 100644 --- a/cmd/apiProxyList_generated_test.go +++ b/cmd/apiProxyList_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyList_test.go b/cmd/apiProxyList_test.go index 6cf9430e0..be1ce9e39 100644 --- a/cmd/apiProxyList_test.go +++ b/cmd/apiProxyList_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyUpload_generated_test.go b/cmd/apiProxyUpload_generated_test.go index 73b3b6b79..0fae52332 100644 --- a/cmd/apiProxyUpload_generated_test.go +++ b/cmd/apiProxyUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/apiProxyUpload_test.go b/cmd/apiProxyUpload_test.go index 58a2570b7..73c6776f3 100644 --- a/cmd/apiProxyUpload_test.go +++ b/cmd/apiProxyUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/artifactPrepareVersion_generated_test.go b/cmd/artifactPrepareVersion_generated_test.go index 86e68ea37..e91ebcad0 100644 --- a/cmd/artifactPrepareVersion_generated_test.go +++ b/cmd/artifactPrepareVersion_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/artifactPrepareVersion_test.go b/cmd/artifactPrepareVersion_test.go index 23c014bf1..fea762173 100644 --- a/cmd/artifactPrepareVersion_test.go +++ b/cmd/artifactPrepareVersion_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/ascAppUpload_generated_test.go b/cmd/ascAppUpload_generated_test.go index aabb64b74..29c8e840d 100644 --- a/cmd/ascAppUpload_generated_test.go +++ b/cmd/ascAppUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/ascAppUpload_test.go b/cmd/ascAppUpload_test.go index 95ad8d6c1..fd4e5cc4f 100644 --- a/cmd/ascAppUpload_test.go +++ b/cmd/ascAppUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/awsS3Upload_generated_test.go b/cmd/awsS3Upload_generated_test.go index f0d288eff..3c179f2f8 100644 --- a/cmd/awsS3Upload_generated_test.go +++ b/cmd/awsS3Upload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/awsS3Upload_test.go b/cmd/awsS3Upload_test.go index c5ae45327..4ded223b9 100644 --- a/cmd/awsS3Upload_test.go +++ b/cmd/awsS3Upload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/azureBlobUpload_generated_test.go b/cmd/azureBlobUpload_generated_test.go index 5b3924b93..bc85e3e76 100644 --- a/cmd/azureBlobUpload_generated_test.go +++ b/cmd/azureBlobUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/azureBlobUpload_test.go b/cmd/azureBlobUpload_test.go index a74326fff..f8d1dce7f 100644 --- a/cmd/azureBlobUpload_test.go +++ b/cmd/azureBlobUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/batsExecuteTests_generated_test.go b/cmd/batsExecuteTests_generated_test.go index c0f942778..9e839bcea 100644 --- a/cmd/batsExecuteTests_generated_test.go +++ b/cmd/batsExecuteTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/batsExecuteTests_test.go b/cmd/batsExecuteTests_test.go index f402cb16d..3956b3124 100644 --- a/cmd/batsExecuteTests_test.go +++ b/cmd/batsExecuteTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/checkIfStepActive_test.go b/cmd/checkIfStepActive_test.go index fbfa6511f..6b6c52942 100644 --- a/cmd/checkIfStepActive_test.go +++ b/cmd/checkIfStepActive_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/checkmarxExecuteScan_generated_test.go b/cmd/checkmarxExecuteScan_generated_test.go index adb5c139a..cb4450369 100644 --- a/cmd/checkmarxExecuteScan_generated_test.go +++ b/cmd/checkmarxExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/checkmarxExecuteScan_test.go b/cmd/checkmarxExecuteScan_test.go index 127dd0ebe..31f390954 100644 --- a/cmd/checkmarxExecuteScan_test.go +++ b/cmd/checkmarxExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateServiceKey_generated_test.go b/cmd/cloudFoundryCreateServiceKey_generated_test.go index e6b55e896..3fe5a7150 100644 --- a/cmd/cloudFoundryCreateServiceKey_generated_test.go +++ b/cmd/cloudFoundryCreateServiceKey_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateServiceKey_test.go b/cmd/cloudFoundryCreateServiceKey_test.go index 2f4ff997b..dc886c733 100644 --- a/cmd/cloudFoundryCreateServiceKey_test.go +++ b/cmd/cloudFoundryCreateServiceKey_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateService_generated_test.go b/cmd/cloudFoundryCreateService_generated_test.go index b69a9223f..c9e3ae5e1 100644 --- a/cmd/cloudFoundryCreateService_generated_test.go +++ b/cmd/cloudFoundryCreateService_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateService_test.go b/cmd/cloudFoundryCreateService_test.go index f24c2be72..dd5e679f8 100644 --- a/cmd/cloudFoundryCreateService_test.go +++ b/cmd/cloudFoundryCreateService_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateSpace_generated_test.go b/cmd/cloudFoundryCreateSpace_generated_test.go index 593b544d6..c5c98010b 100644 --- a/cmd/cloudFoundryCreateSpace_generated_test.go +++ b/cmd/cloudFoundryCreateSpace_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryCreateSpace_test.go b/cmd/cloudFoundryCreateSpace_test.go index fc15b4ce8..d7feb95a7 100644 --- a/cmd/cloudFoundryCreateSpace_test.go +++ b/cmd/cloudFoundryCreateSpace_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeleteService_generated_test.go b/cmd/cloudFoundryDeleteService_generated_test.go index 37e5ed5ef..be536683c 100644 --- a/cmd/cloudFoundryDeleteService_generated_test.go +++ b/cmd/cloudFoundryDeleteService_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeleteService_test.go b/cmd/cloudFoundryDeleteService_test.go index 959d92725..eab1e814b 100644 --- a/cmd/cloudFoundryDeleteService_test.go +++ b/cmd/cloudFoundryDeleteService_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeleteSpace_generated_test.go b/cmd/cloudFoundryDeleteSpace_generated_test.go index b2c5ac22c..65b5dea4d 100644 --- a/cmd/cloudFoundryDeleteSpace_generated_test.go +++ b/cmd/cloudFoundryDeleteSpace_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeleteSpace_test.go b/cmd/cloudFoundryDeleteSpace_test.go index 141b670ae..fa62702c3 100644 --- a/cmd/cloudFoundryDeleteSpace_test.go +++ b/cmd/cloudFoundryDeleteSpace_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeploy_generated_test.go b/cmd/cloudFoundryDeploy_generated_test.go index 11d21876c..4ab2878b2 100644 --- a/cmd/cloudFoundryDeploy_generated_test.go +++ b/cmd/cloudFoundryDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cloudFoundryDeploy_test.go b/cmd/cloudFoundryDeploy_test.go index 7cf2d53bd..5596db93f 100644 --- a/cmd/cloudFoundryDeploy_test.go +++ b/cmd/cloudFoundryDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cnbBuild_generated_test.go b/cmd/cnbBuild_generated_test.go index 151398b8b..80acd0e98 100644 --- a/cmd/cnbBuild_generated_test.go +++ b/cmd/cnbBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/cnbBuild_test.go b/cmd/cnbBuild_test.go index e24de5ea4..98f8b0f69 100644 --- a/cmd/cnbBuild_test.go +++ b/cmd/cnbBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/codeqlExecuteScan_generated_test.go b/cmd/codeqlExecuteScan_generated_test.go index f8ee3d67a..8a777e34a 100644 --- a/cmd/codeqlExecuteScan_generated_test.go +++ b/cmd/codeqlExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/codeqlExecuteScan_test.go b/cmd/codeqlExecuteScan_test.go index 745844d87..e4f99e4bc 100644 --- a/cmd/codeqlExecuteScan_test.go +++ b/cmd/codeqlExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/containerExecuteStructureTests_generated_test.go b/cmd/containerExecuteStructureTests_generated_test.go index 208b41c23..2552c5532 100644 --- a/cmd/containerExecuteStructureTests_generated_test.go +++ b/cmd/containerExecuteStructureTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/containerExecuteStructureTests_test.go b/cmd/containerExecuteStructureTests_test.go index 0fe59653b..d3b8787c3 100644 --- a/cmd/containerExecuteStructureTests_test.go +++ b/cmd/containerExecuteStructureTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/containerSaveImage_generated_test.go b/cmd/containerSaveImage_generated_test.go index aa617d112..12c5413f3 100644 --- a/cmd/containerSaveImage_generated_test.go +++ b/cmd/containerSaveImage_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/containerSaveImage_test.go b/cmd/containerSaveImage_test.go index 6de7cf8d7..57b69767f 100644 --- a/cmd/containerSaveImage_test.go +++ b/cmd/containerSaveImage_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/credentialdiggerScan_generated_test.go b/cmd/credentialdiggerScan_generated_test.go index 646c3a9ac..13cc3acad 100644 --- a/cmd/credentialdiggerScan_generated_test.go +++ b/cmd/credentialdiggerScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/credentialdiggerScan_test.go b/cmd/credentialdiggerScan_test.go index ae5fa85d7..2962675dd 100644 --- a/cmd/credentialdiggerScan_test.go +++ b/cmd/credentialdiggerScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/detectExecuteScan_generated_test.go b/cmd/detectExecuteScan_generated_test.go index 2539ef1a3..ec5c00cdc 100644 --- a/cmd/detectExecuteScan_generated_test.go +++ b/cmd/detectExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/detectExecuteScan_test.go b/cmd/detectExecuteScan_test.go index b332e8bcb..f88fc805d 100644 --- a/cmd/detectExecuteScan_test.go +++ b/cmd/detectExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/fortifyExecuteScan_generated_test.go b/cmd/fortifyExecuteScan_generated_test.go index 02ac2574b..e651adff3 100644 --- a/cmd/fortifyExecuteScan_generated_test.go +++ b/cmd/fortifyExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/fortifyExecuteScan_test.go b/cmd/fortifyExecuteScan_test.go index b4801fba4..b7239e334 100644 --- a/cmd/fortifyExecuteScan_test.go +++ b/cmd/fortifyExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gaugeExecuteTests_generated_test.go b/cmd/gaugeExecuteTests_generated_test.go index 3f5d52835..cae843daa 100644 --- a/cmd/gaugeExecuteTests_generated_test.go +++ b/cmd/gaugeExecuteTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gaugeExecuteTests_test.go b/cmd/gaugeExecuteTests_test.go index 9d0de7633..ece4f1021 100644 --- a/cmd/gaugeExecuteTests_test.go +++ b/cmd/gaugeExecuteTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsCloneRepository_generated_test.go b/cmd/gctsCloneRepository_generated_test.go index 2029f922b..0431be4a3 100644 --- a/cmd/gctsCloneRepository_generated_test.go +++ b/cmd/gctsCloneRepository_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsCloneRepository_test.go b/cmd/gctsCloneRepository_test.go index 5ee813a4f..30924ab50 100644 --- a/cmd/gctsCloneRepository_test.go +++ b/cmd/gctsCloneRepository_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsCreateRepository_generated_test.go b/cmd/gctsCreateRepository_generated_test.go index 9ce677dac..d4a97dad0 100644 --- a/cmd/gctsCreateRepository_generated_test.go +++ b/cmd/gctsCreateRepository_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsCreateRepository_test.go b/cmd/gctsCreateRepository_test.go index 0b5e770e7..31b41712a 100644 --- a/cmd/gctsCreateRepository_test.go +++ b/cmd/gctsCreateRepository_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsDeploy_generated_test.go b/cmd/gctsDeploy_generated_test.go index 8bb49fa3a..0ce2c3b29 100644 --- a/cmd/gctsDeploy_generated_test.go +++ b/cmd/gctsDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsDeploy_test.go b/cmd/gctsDeploy_test.go index 516c8123d..3c3a28d03 100644 --- a/cmd/gctsDeploy_test.go +++ b/cmd/gctsDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsExecuteABAPQualityChecks_generated_test.go b/cmd/gctsExecuteABAPQualityChecks_generated_test.go index 4c69c96dc..519bcd28e 100644 --- a/cmd/gctsExecuteABAPQualityChecks_generated_test.go +++ b/cmd/gctsExecuteABAPQualityChecks_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsExecuteABAPQualityChecks_test.go b/cmd/gctsExecuteABAPQualityChecks_test.go index fab814adb..ad3e30b31 100644 --- a/cmd/gctsExecuteABAPQualityChecks_test.go +++ b/cmd/gctsExecuteABAPQualityChecks_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsExecuteABAPUnitTests_generated_test.go b/cmd/gctsExecuteABAPUnitTests_generated_test.go index 8f53eaa03..d387f36d3 100644 --- a/cmd/gctsExecuteABAPUnitTests_generated_test.go +++ b/cmd/gctsExecuteABAPUnitTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsExecuteABAPUnitTests_test.go b/cmd/gctsExecuteABAPUnitTests_test.go index 31d6c76fc..0e9c3293b 100644 --- a/cmd/gctsExecuteABAPUnitTests_test.go +++ b/cmd/gctsExecuteABAPUnitTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsRollback_generated_test.go b/cmd/gctsRollback_generated_test.go index 509f9747e..b2bf886b9 100644 --- a/cmd/gctsRollback_generated_test.go +++ b/cmd/gctsRollback_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gctsRollback_test.go b/cmd/gctsRollback_test.go index b3500d585..66340762d 100644 --- a/cmd/gctsRollback_test.go +++ b/cmd/gctsRollback_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/getConfig_test.go b/cmd/getConfig_test.go index df1049f02..2d5012967 100644 --- a/cmd/getConfig_test.go +++ b/cmd/getConfig_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/getDefaults_test.go b/cmd/getDefaults_test.go index 94e3cd30b..5d473d2e0 100644 --- a/cmd/getDefaults_test.go +++ b/cmd/getDefaults_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCheckBranchProtection_generated_test.go b/cmd/githubCheckBranchProtection_generated_test.go index 23e63522d..f23bbbce3 100644 --- a/cmd/githubCheckBranchProtection_generated_test.go +++ b/cmd/githubCheckBranchProtection_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCheckBranchProtection_test.go b/cmd/githubCheckBranchProtection_test.go index eb8ca9d8b..a769a40c1 100644 --- a/cmd/githubCheckBranchProtection_test.go +++ b/cmd/githubCheckBranchProtection_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCommentIssue_generated_test.go b/cmd/githubCommentIssue_generated_test.go index a280acbc5..83829c3f3 100644 --- a/cmd/githubCommentIssue_generated_test.go +++ b/cmd/githubCommentIssue_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCommentIssue_test.go b/cmd/githubCommentIssue_test.go index 5665c241e..50d28dd4d 100644 --- a/cmd/githubCommentIssue_test.go +++ b/cmd/githubCommentIssue_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCreateIssue_generated_test.go b/cmd/githubCreateIssue_generated_test.go index 3d955bde6..556ba7bb2 100644 --- a/cmd/githubCreateIssue_generated_test.go +++ b/cmd/githubCreateIssue_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCreateIssue_test.go b/cmd/githubCreateIssue_test.go index df86574ef..07a23fced 100644 --- a/cmd/githubCreateIssue_test.go +++ b/cmd/githubCreateIssue_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCreatePullRequest_generated_test.go b/cmd/githubCreatePullRequest_generated_test.go index c57af134d..dcd129ee3 100644 --- a/cmd/githubCreatePullRequest_generated_test.go +++ b/cmd/githubCreatePullRequest_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubCreatePullRequest_test.go b/cmd/githubCreatePullRequest_test.go index d539f6e4d..8eebe7612 100644 --- a/cmd/githubCreatePullRequest_test.go +++ b/cmd/githubCreatePullRequest_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubPublishRelease_generated_test.go b/cmd/githubPublishRelease_generated_test.go index fc8de14f3..ce384cb38 100644 --- a/cmd/githubPublishRelease_generated_test.go +++ b/cmd/githubPublishRelease_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubPublishRelease_test.go b/cmd/githubPublishRelease_test.go index 6d3db742e..a647fbf15 100644 --- a/cmd/githubPublishRelease_test.go +++ b/cmd/githubPublishRelease_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubSetCommitStatus_generated_test.go b/cmd/githubSetCommitStatus_generated_test.go index 6bdc3a74e..df5246d64 100644 --- a/cmd/githubSetCommitStatus_generated_test.go +++ b/cmd/githubSetCommitStatus_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/githubSetCommitStatus_test.go b/cmd/githubSetCommitStatus_test.go index 9ef0cb854..b3e78e61f 100644 --- a/cmd/githubSetCommitStatus_test.go +++ b/cmd/githubSetCommitStatus_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gitopsUpdateDeployment_generated_test.go b/cmd/gitopsUpdateDeployment_generated_test.go index c10f55743..8cbf97cd9 100644 --- a/cmd/gitopsUpdateDeployment_generated_test.go +++ b/cmd/gitopsUpdateDeployment_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gitopsUpdateDeployment_test.go b/cmd/gitopsUpdateDeployment_test.go index a2f20f265..2d05f1ce3 100644 --- a/cmd/gitopsUpdateDeployment_test.go +++ b/cmd/gitopsUpdateDeployment_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/golangBuild.go b/cmd/golangBuild.go index b7327fcc2..6328f02f9 100644 --- a/cmd/golangBuild.go +++ b/cmd/golangBuild.go @@ -366,7 +366,7 @@ func prepareGolangEnvironment(config *golangBuildOptions, goModFile *modfile.Fil func runGolangTests(config *golangBuildOptions, utils golangBuildUtils) (bool, error) { // execute gotestsum in order to have more output options - testOptions := []string{"--junitfile", golangUnitTestOutput, "--jsonfile", unitJsonReport, "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "./..."} + testOptions := []string{"--junitfile", golangUnitTestOutput, "--jsonfile", unitJsonReport, "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "-tags=unit", "./..."} testOptions = append(testOptions, config.TestOptions...) if err := utils.RunExecutable("gotestsum", testOptions...); err != nil { exists, fileErr := utils.FileExists(golangUnitTestOutput) diff --git a/cmd/golangBuild_generated.go b/cmd/golangBuild_generated.go index 960c10f3f..e2d8185c9 100644 --- a/cmd/golangBuild_generated.go +++ b/cmd/golangBuild_generated.go @@ -238,7 +238,7 @@ func addGolangBuildFlags(cmd *cobra.Command, stepConfig *golangBuildOptions) { cmd.Flags().StringVar(&stepConfig.TargetRepositoryURL, "targetRepositoryURL", os.Getenv("PIPER_targetRepositoryURL"), "URL of the target repository where the compiled binaries shall be uploaded - typically provided by the CI/CD environment.") cmd.Flags().BoolVar(&stepConfig.ReportCoverage, "reportCoverage", true, "Defines if a coverage report should be created.") cmd.Flags().BoolVar(&stepConfig.RunLint, "runLint", false, "Configures the build to run linters with [golangci-lint](https://golangci-lint.run/).") - cmd.Flags().BoolVar(&stepConfig.RunTests, "runTests", true, "Activates execution of tests using [gotestsum](https://github.com/gotestyourself/gotestsum).") + cmd.Flags().BoolVar(&stepConfig.RunTests, "runTests", true, "Activates execution of tests using [gotestsum](https://github.com/gotestyourself/gotestsum). Tag Go unit tests with 'unit' build tag to exclude them using `--runTests=false`") cmd.Flags().BoolVar(&stepConfig.RunIntegrationTests, "runIntegrationTests", false, "Activates execution of a second test run using tag `integration`.") cmd.Flags().StringSliceVar(&stepConfig.TargetArchitectures, "targetArchitectures", []string{`linux,amd64`}, "Defines the target architectures for which the build should run using OS and architecture separated by a comma.") cmd.Flags().StringSliceVar(&stepConfig.TestOptions, "testOptions", []string{}, "Options to pass to test as per `go test` documentation (comprises e.g. flags, packages).") diff --git a/cmd/golangBuild_generated_test.go b/cmd/golangBuild_generated_test.go index 9aa464fcd..544cc9ad7 100644 --- a/cmd/golangBuild_generated_test.go +++ b/cmd/golangBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/golangBuild_test.go b/cmd/golangBuild_test.go index 016920e85..e582608d8 100644 --- a/cmd/golangBuild_test.go +++ b/cmd/golangBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( @@ -139,7 +142,7 @@ go 1.17` assert.Equal(t, "go", utils.ExecMockRunner.Calls[0].Exec) assert.Equal(t, []string{"install", "gotest.tools/gotestsum@latest"}, utils.ExecMockRunner.Calls[0].Params) assert.Equal(t, "gotestsum", utils.ExecMockRunner.Calls[1].Exec) - assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "./..."}, utils.ExecMockRunner.Calls[1].Params) + assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "-tags=unit", "./..."}, utils.ExecMockRunner.Calls[1].Params) assert.Equal(t, "go", utils.ExecMockRunner.Calls[2].Exec) assert.Equal(t, []string{"build", "-trimpath", "-ldflags", "test", "package/foo"}, utils.ExecMockRunner.Calls[2].Params) }) @@ -160,7 +163,7 @@ go 1.17` assert.Equal(t, "go", utils.ExecMockRunner.Calls[0].Exec) assert.Equal(t, []string{"install", "gotest.tools/gotestsum@latest"}, utils.ExecMockRunner.Calls[0].Params) assert.Equal(t, "gotestsum", utils.ExecMockRunner.Calls[1].Exec) - assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "./...", "--foo", "--bar"}, utils.ExecMockRunner.Calls[1].Params) + assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "-tags=unit", "./...", "--foo", "--bar"}, utils.ExecMockRunner.Calls[1].Params) assert.Equal(t, "go", utils.ExecMockRunner.Calls[2].Exec) assert.Equal(t, []string{"build", "-trimpath", "package/foo"}, utils.ExecMockRunner.Calls[2].Params) }) @@ -528,7 +531,7 @@ func TestRunGolangTests(t *testing.T) { assert.NoError(t, err) assert.True(t, success) assert.Equal(t, "gotestsum", utils.ExecMockRunner.Calls[0].Exec) - assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "./..."}, utils.ExecMockRunner.Calls[0].Params) + assert.Equal(t, []string{"--junitfile", "TEST-go.xml", "--jsonfile", "unit-report.out", "--", fmt.Sprintf("-coverprofile=%v", coverageFile), "-tags=unit", "./..."}, utils.ExecMockRunner.Calls[0].Params) }) t.Run("success - failed tests", func(t *testing.T) { diff --git a/cmd/gradleExecuteBuild_generated_test.go b/cmd/gradleExecuteBuild_generated_test.go index bc6ae65c0..706766af6 100644 --- a/cmd/gradleExecuteBuild_generated_test.go +++ b/cmd/gradleExecuteBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/gradleExecuteBuild_test.go b/cmd/gradleExecuteBuild_test.go index 957c43041..525e53f92 100644 --- a/cmd/gradleExecuteBuild_test.go +++ b/cmd/gradleExecuteBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/hadolintExecute_generated_test.go b/cmd/hadolintExecute_generated_test.go index 321382e43..5900c2302 100644 --- a/cmd/hadolintExecute_generated_test.go +++ b/cmd/hadolintExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/hadolintExecute_test.go b/cmd/hadolintExecute_test.go index ea03c6789..f1c1c0921 100644 --- a/cmd/hadolintExecute_test.go +++ b/cmd/hadolintExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/helmExecute_generated_test.go b/cmd/helmExecute_generated_test.go index 0f05b814a..12cc5783c 100644 --- a/cmd/helmExecute_generated_test.go +++ b/cmd/helmExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/helmExecute_test.go b/cmd/helmExecute_test.go index f6a557a75..45b4b5bf1 100644 --- a/cmd/helmExecute_test.go +++ b/cmd/helmExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/influxWriteData_generated_test.go b/cmd/influxWriteData_generated_test.go index 03a486c8d..165f56313 100644 --- a/cmd/influxWriteData_generated_test.go +++ b/cmd/influxWriteData_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/influxWriteData_test.go b/cmd/influxWriteData_test.go index 4fafccfaf..8649df726 100644 --- a/cmd/influxWriteData_test.go +++ b/cmd/influxWriteData_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactDeploy_generated_test.go b/cmd/integrationArtifactDeploy_generated_test.go index 590e5cb8e..b5b71313f 100644 --- a/cmd/integrationArtifactDeploy_generated_test.go +++ b/cmd/integrationArtifactDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactDeploy_test.go b/cmd/integrationArtifactDeploy_test.go index 81ec17fa0..24ba7f7bc 100644 --- a/cmd/integrationArtifactDeploy_test.go +++ b/cmd/integrationArtifactDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactDownload_generated_test.go b/cmd/integrationArtifactDownload_generated_test.go index a9ed0ccfd..252f04b31 100644 --- a/cmd/integrationArtifactDownload_generated_test.go +++ b/cmd/integrationArtifactDownload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactDownload_test.go b/cmd/integrationArtifactDownload_test.go index e3edd7350..4849e8951 100644 --- a/cmd/integrationArtifactDownload_test.go +++ b/cmd/integrationArtifactDownload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactGetMplStatus_generated_test.go b/cmd/integrationArtifactGetMplStatus_generated_test.go index 8310c06ed..89368ddd3 100644 --- a/cmd/integrationArtifactGetMplStatus_generated_test.go +++ b/cmd/integrationArtifactGetMplStatus_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactGetMplStatus_test.go b/cmd/integrationArtifactGetMplStatus_test.go index 954b998c6..d928276c3 100644 --- a/cmd/integrationArtifactGetMplStatus_test.go +++ b/cmd/integrationArtifactGetMplStatus_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactGetServiceEndpoint_generated_test.go b/cmd/integrationArtifactGetServiceEndpoint_generated_test.go index 604a6e55c..2bae69db2 100644 --- a/cmd/integrationArtifactGetServiceEndpoint_generated_test.go +++ b/cmd/integrationArtifactGetServiceEndpoint_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactGetServiceEndpoint_test.go b/cmd/integrationArtifactGetServiceEndpoint_test.go index 808a49d7a..f69e09946 100644 --- a/cmd/integrationArtifactGetServiceEndpoint_test.go +++ b/cmd/integrationArtifactGetServiceEndpoint_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactResource_generated_test.go b/cmd/integrationArtifactResource_generated_test.go index 539f56c87..78f7ac5c4 100644 --- a/cmd/integrationArtifactResource_generated_test.go +++ b/cmd/integrationArtifactResource_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactResource_test.go b/cmd/integrationArtifactResource_test.go index af9c32987..fcd2caf82 100644 --- a/cmd/integrationArtifactResource_test.go +++ b/cmd/integrationArtifactResource_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactTransport_generated_test.go b/cmd/integrationArtifactTransport_generated_test.go index 536293f25..81605e9bf 100644 --- a/cmd/integrationArtifactTransport_generated_test.go +++ b/cmd/integrationArtifactTransport_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactTransport_test.go b/cmd/integrationArtifactTransport_test.go index 40088a01c..1d2c08185 100644 --- a/cmd/integrationArtifactTransport_test.go +++ b/cmd/integrationArtifactTransport_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactTriggerIntegrationTest_generated_test.go b/cmd/integrationArtifactTriggerIntegrationTest_generated_test.go index bade85d28..d58c88ca8 100644 --- a/cmd/integrationArtifactTriggerIntegrationTest_generated_test.go +++ b/cmd/integrationArtifactTriggerIntegrationTest_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactTriggerIntegrationTest_test.go b/cmd/integrationArtifactTriggerIntegrationTest_test.go index 6abfe37fa..7c5ef1f21 100644 --- a/cmd/integrationArtifactTriggerIntegrationTest_test.go +++ b/cmd/integrationArtifactTriggerIntegrationTest_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUnDeploy_generated_test.go b/cmd/integrationArtifactUnDeploy_generated_test.go index f66b8848a..6ccb23c59 100644 --- a/cmd/integrationArtifactUnDeploy_generated_test.go +++ b/cmd/integrationArtifactUnDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUnDeploy_test.go b/cmd/integrationArtifactUnDeploy_test.go index 128ab2697..8109f8ba5 100644 --- a/cmd/integrationArtifactUnDeploy_test.go +++ b/cmd/integrationArtifactUnDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUpdateConfiguration_generated_test.go b/cmd/integrationArtifactUpdateConfiguration_generated_test.go index 132c4e189..aadd94d32 100644 --- a/cmd/integrationArtifactUpdateConfiguration_generated_test.go +++ b/cmd/integrationArtifactUpdateConfiguration_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUpdateConfiguration_test.go b/cmd/integrationArtifactUpdateConfiguration_test.go index d79ecf50f..b7705536a 100644 --- a/cmd/integrationArtifactUpdateConfiguration_test.go +++ b/cmd/integrationArtifactUpdateConfiguration_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUpload_generated_test.go b/cmd/integrationArtifactUpload_generated_test.go index e55b74ea9..8ecdc013c 100644 --- a/cmd/integrationArtifactUpload_generated_test.go +++ b/cmd/integrationArtifactUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/integrationArtifactUpload_test.go b/cmd/integrationArtifactUpload_test.go index 4a797b3f3..a5be5a123 100644 --- a/cmd/integrationArtifactUpload_test.go +++ b/cmd/integrationArtifactUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/isChangeInDevelopment_generated_test.go b/cmd/isChangeInDevelopment_generated_test.go index 8b49103e5..4e2fbaf14 100644 --- a/cmd/isChangeInDevelopment_generated_test.go +++ b/cmd/isChangeInDevelopment_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/isChangeInDevelopment_test.go b/cmd/isChangeInDevelopment_test.go index d96c391b6..79da0d3e4 100644 --- a/cmd/isChangeInDevelopment_test.go +++ b/cmd/isChangeInDevelopment_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/jsonApplyPatch_generated_test.go b/cmd/jsonApplyPatch_generated_test.go index 9f79f3e4c..64c16a55c 100644 --- a/cmd/jsonApplyPatch_generated_test.go +++ b/cmd/jsonApplyPatch_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/jsonApplyPatch_test.go b/cmd/jsonApplyPatch_test.go index 578003915..4f219309f 100644 --- a/cmd/jsonApplyPatch_test.go +++ b/cmd/jsonApplyPatch_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/kanikoExecute_generated_test.go b/cmd/kanikoExecute_generated_test.go index 34b385b0f..58cae2587 100644 --- a/cmd/kanikoExecute_generated_test.go +++ b/cmd/kanikoExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/kanikoExecute_test.go b/cmd/kanikoExecute_test.go index b1ffaafea..99f1cd6f1 100644 --- a/cmd/kanikoExecute_test.go +++ b/cmd/kanikoExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/karmaExecuteTests_generated_test.go b/cmd/karmaExecuteTests_generated_test.go index 2d4dfeceb..118732386 100644 --- a/cmd/karmaExecuteTests_generated_test.go +++ b/cmd/karmaExecuteTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/karmaExecuteTests_test.go b/cmd/karmaExecuteTests_test.go index edc5033f6..1e8e92022 100644 --- a/cmd/karmaExecuteTests_test.go +++ b/cmd/karmaExecuteTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/kubernetesDeploy_generated_test.go b/cmd/kubernetesDeploy_generated_test.go index 9b00d28f4..b474bf365 100644 --- a/cmd/kubernetesDeploy_generated_test.go +++ b/cmd/kubernetesDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/kubernetesDeploy_test.go b/cmd/kubernetesDeploy_test.go index f8796192e..ac4826c33 100644 --- a/cmd/kubernetesDeploy_test.go +++ b/cmd/kubernetesDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/malwareExecuteScan_generated_test.go b/cmd/malwareExecuteScan_generated_test.go index acff89132..c616f9c1f 100644 --- a/cmd/malwareExecuteScan_generated_test.go +++ b/cmd/malwareExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/malwareExecuteScan_test.go b/cmd/malwareExecuteScan_test.go index a3cfd2183..99f84c9b2 100644 --- a/cmd/malwareExecuteScan_test.go +++ b/cmd/malwareExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenBuild_generated_test.go b/cmd/mavenBuild_generated_test.go index d310c5464..86234d405 100644 --- a/cmd/mavenBuild_generated_test.go +++ b/cmd/mavenBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenBuild_test.go b/cmd/mavenBuild_test.go index e942aace4..19a6baddf 100644 --- a/cmd/mavenBuild_test.go +++ b/cmd/mavenBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecuteIntegration_generated_test.go b/cmd/mavenExecuteIntegration_generated_test.go index 3d873b5c8..d39d22ce5 100644 --- a/cmd/mavenExecuteIntegration_generated_test.go +++ b/cmd/mavenExecuteIntegration_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecuteIntegration_test.go b/cmd/mavenExecuteIntegration_test.go index 0985d7514..349bdb6f1 100644 --- a/cmd/mavenExecuteIntegration_test.go +++ b/cmd/mavenExecuteIntegration_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecuteStaticCodeChecks_generated_test.go b/cmd/mavenExecuteStaticCodeChecks_generated_test.go index 630850775..4d0f74c11 100644 --- a/cmd/mavenExecuteStaticCodeChecks_generated_test.go +++ b/cmd/mavenExecuteStaticCodeChecks_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecuteStaticCodeChecks_test.go b/cmd/mavenExecuteStaticCodeChecks_test.go index aed079c8e..db38cdf84 100644 --- a/cmd/mavenExecuteStaticCodeChecks_test.go +++ b/cmd/mavenExecuteStaticCodeChecks_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecute_generated_test.go b/cmd/mavenExecute_generated_test.go index 31bb3e044..c1a21cd22 100644 --- a/cmd/mavenExecute_generated_test.go +++ b/cmd/mavenExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mavenExecute_test.go b/cmd/mavenExecute_test.go index 0205d4615..2f8b8f596 100644 --- a/cmd/mavenExecute_test.go +++ b/cmd/mavenExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mtaBuild_generated_test.go b/cmd/mtaBuild_generated_test.go index 93eca6bd2..628979887 100644 --- a/cmd/mtaBuild_generated_test.go +++ b/cmd/mtaBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/mtaBuild_test.go b/cmd/mtaBuild_test.go index c1b163a0f..291fb8456 100644 --- a/cmd/mtaBuild_test.go +++ b/cmd/mtaBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/newmanExecute_generated_test.go b/cmd/newmanExecute_generated_test.go index bdab743bd..db8e233e2 100644 --- a/cmd/newmanExecute_generated_test.go +++ b/cmd/newmanExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/newmanExecute_test.go b/cmd/newmanExecute_test.go index aa1a2373a..d928c16b9 100644 --- a/cmd/newmanExecute_test.go +++ b/cmd/newmanExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/nexusUpload_generated_test.go b/cmd/nexusUpload_generated_test.go index 6e92bdd7d..0e07af01a 100644 --- a/cmd/nexusUpload_generated_test.go +++ b/cmd/nexusUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/nexusUpload_test.go b/cmd/nexusUpload_test.go index 68e61720f..7b2cee9f3 100644 --- a/cmd/nexusUpload_test.go +++ b/cmd/nexusUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/npmExecuteLint_generated_test.go b/cmd/npmExecuteLint_generated_test.go index 8137447a2..a14758583 100644 --- a/cmd/npmExecuteLint_generated_test.go +++ b/cmd/npmExecuteLint_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/npmExecuteLint_test.go b/cmd/npmExecuteLint_test.go index 3fa5a2f44..50f16120e 100644 --- a/cmd/npmExecuteLint_test.go +++ b/cmd/npmExecuteLint_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/npmExecuteScripts_generated_test.go b/cmd/npmExecuteScripts_generated_test.go index aeb86495e..cab398648 100644 --- a/cmd/npmExecuteScripts_generated_test.go +++ b/cmd/npmExecuteScripts_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/npmExecuteScripts_test.go b/cmd/npmExecuteScripts_test.go index 8072a136a..e8c8053b9 100644 --- a/cmd/npmExecuteScripts_test.go +++ b/cmd/npmExecuteScripts_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/pipelineCreateScanSummary_generated_test.go b/cmd/pipelineCreateScanSummary_generated_test.go index ebd483691..c054851d5 100644 --- a/cmd/pipelineCreateScanSummary_generated_test.go +++ b/cmd/pipelineCreateScanSummary_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/pipelineCreateScanSummary_test.go b/cmd/pipelineCreateScanSummary_test.go index 4ad61656d..bafd7f228 100644 --- a/cmd/pipelineCreateScanSummary_test.go +++ b/cmd/pipelineCreateScanSummary_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/piper_test.go b/cmd/piper_test.go index 11c37234b..cd4ec8430 100644 --- a/cmd/piper_test.go +++ b/cmd/piper_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/protecodeExecuteScan_generated_test.go b/cmd/protecodeExecuteScan_generated_test.go index 696644838..bcf59b6d8 100644 --- a/cmd/protecodeExecuteScan_generated_test.go +++ b/cmd/protecodeExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/protecodeExecuteScan_test.go b/cmd/protecodeExecuteScan_test.go index 0052a7d0f..61570920a 100644 --- a/cmd/protecodeExecuteScan_test.go +++ b/cmd/protecodeExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/pythonBuild_generated_test.go b/cmd/pythonBuild_generated_test.go index e17e54e72..62adcfef0 100644 --- a/cmd/pythonBuild_generated_test.go +++ b/cmd/pythonBuild_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/pythonBuild_test.go b/cmd/pythonBuild_test.go index 60e804ac1..0e357cfec 100644 --- a/cmd/pythonBuild_test.go +++ b/cmd/pythonBuild_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/shellExecute_generated_test.go b/cmd/shellExecute_generated_test.go index 89a9a1760..1c5cb5bd7 100644 --- a/cmd/shellExecute_generated_test.go +++ b/cmd/shellExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/shellExecute_test.go b/cmd/shellExecute_test.go index 1b187e579..e4e376dcb 100644 --- a/cmd/shellExecute_test.go +++ b/cmd/shellExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/sonarExecuteScan_generated_test.go b/cmd/sonarExecuteScan_generated_test.go index 18ce29986..12ee4fb8e 100644 --- a/cmd/sonarExecuteScan_generated_test.go +++ b/cmd/sonarExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/sonarExecuteScan_test.go b/cmd/sonarExecuteScan_test.go index d5572b2ae..f62e32ac1 100644 --- a/cmd/sonarExecuteScan_test.go +++ b/cmd/sonarExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/terraformExecute_generated_test.go b/cmd/terraformExecute_generated_test.go index 77a55f8ef..18670a037 100644 --- a/cmd/terraformExecute_generated_test.go +++ b/cmd/terraformExecute_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/terraformExecute_test.go b/cmd/terraformExecute_test.go index f9433a8db..36ba23e16 100644 --- a/cmd/terraformExecute_test.go +++ b/cmd/terraformExecute_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/tmsExport_generated_test.go b/cmd/tmsExport_generated_test.go index e52b23951..8a5a37cf3 100644 --- a/cmd/tmsExport_generated_test.go +++ b/cmd/tmsExport_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/tmsExport_test.go b/cmd/tmsExport_test.go index 3965fc088..76a759637 100644 --- a/cmd/tmsExport_test.go +++ b/cmd/tmsExport_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/tmsUpload_generated_test.go b/cmd/tmsUpload_generated_test.go index 737478049..d430f302d 100644 --- a/cmd/tmsUpload_generated_test.go +++ b/cmd/tmsUpload_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/tmsUpload_test.go b/cmd/tmsUpload_test.go index 2c3f43722..d263db453 100644 --- a/cmd/tmsUpload_test.go +++ b/cmd/tmsUpload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestDocIDFromGit_generated_test.go b/cmd/transportRequestDocIDFromGit_generated_test.go index 8ed630436..fcd25371a 100644 --- a/cmd/transportRequestDocIDFromGit_generated_test.go +++ b/cmd/transportRequestDocIDFromGit_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestDocIDFromGit_test.go b/cmd/transportRequestDocIDFromGit_test.go index b240970f5..c6c59498e 100644 --- a/cmd/transportRequestDocIDFromGit_test.go +++ b/cmd/transportRequestDocIDFromGit_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestReqIDFromGit_generated_test.go b/cmd/transportRequestReqIDFromGit_generated_test.go index 5487a7b20..e1600e66a 100644 --- a/cmd/transportRequestReqIDFromGit_generated_test.go +++ b/cmd/transportRequestReqIDFromGit_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestReqIDFromGit_test.go b/cmd/transportRequestReqIDFromGit_test.go index 21cbf0692..93d32d667 100644 --- a/cmd/transportRequestReqIDFromGit_test.go +++ b/cmd/transportRequestReqIDFromGit_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadCTS_generated_test.go b/cmd/transportRequestUploadCTS_generated_test.go index 3e02e076c..23fdd2ced 100644 --- a/cmd/transportRequestUploadCTS_generated_test.go +++ b/cmd/transportRequestUploadCTS_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadCTS_test.go b/cmd/transportRequestUploadCTS_test.go index eb3697ee6..6c4fe87c0 100644 --- a/cmd/transportRequestUploadCTS_test.go +++ b/cmd/transportRequestUploadCTS_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadRFC_generated_test.go b/cmd/transportRequestUploadRFC_generated_test.go index 61fbd547b..66a695486 100644 --- a/cmd/transportRequestUploadRFC_generated_test.go +++ b/cmd/transportRequestUploadRFC_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadRFC_test.go b/cmd/transportRequestUploadRFC_test.go index d237b5640..4cb6a5cb0 100644 --- a/cmd/transportRequestUploadRFC_test.go +++ b/cmd/transportRequestUploadRFC_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadSOLMAN_generated_test.go b/cmd/transportRequestUploadSOLMAN_generated_test.go index e9762cf53..3b2824555 100644 --- a/cmd/transportRequestUploadSOLMAN_generated_test.go +++ b/cmd/transportRequestUploadSOLMAN_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/transportRequestUploadSOLMAN_test.go b/cmd/transportRequestUploadSOLMAN_test.go index b8458c0d4..5fc02c9ed 100644 --- a/cmd/transportRequestUploadSOLMAN_test.go +++ b/cmd/transportRequestUploadSOLMAN_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/uiVeri5ExecuteTests_generated_test.go b/cmd/uiVeri5ExecuteTests_generated_test.go index 1890a1fc7..db135280e 100644 --- a/cmd/uiVeri5ExecuteTests_generated_test.go +++ b/cmd/uiVeri5ExecuteTests_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/uiVeri5ExecuteTests_test.go b/cmd/uiVeri5ExecuteTests_test.go index 0a605229a..dbef5a290 100644 --- a/cmd/uiVeri5ExecuteTests_test.go +++ b/cmd/uiVeri5ExecuteTests_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/vaultRotateSecretId_generated_test.go b/cmd/vaultRotateSecretId_generated_test.go index ecd52cb3b..31d3efd8c 100644 --- a/cmd/vaultRotateSecretId_generated_test.go +++ b/cmd/vaultRotateSecretId_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/vaultRotateSecretId_test.go b/cmd/vaultRotateSecretId_test.go index 29e3656b5..b51df2417 100644 --- a/cmd/vaultRotateSecretId_test.go +++ b/cmd/vaultRotateSecretId_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/version_test.go b/cmd/version_test.go index c72ec1649..fb690704f 100644 --- a/cmd/version_test.go +++ b/cmd/version_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/whitesourceExecuteScan_generated_test.go b/cmd/whitesourceExecuteScan_generated_test.go index 070a34508..b8e4ce37c 100644 --- a/cmd/whitesourceExecuteScan_generated_test.go +++ b/cmd/whitesourceExecuteScan_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/whitesourceExecuteScan_test.go b/cmd/whitesourceExecuteScan_test.go index 5f441aa3f..98bbd24bf 100644 --- a/cmd/whitesourceExecuteScan_test.go +++ b/cmd/whitesourceExecuteScan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/xsDeploy_generated_test.go b/cmd/xsDeploy_generated_test.go index a85a701d4..d5034d379 100644 --- a/cmd/xsDeploy_generated_test.go +++ b/cmd/xsDeploy_generated_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/cmd/xsDeploy_test.go b/cmd/xsDeploy_test.go index cf6591dec..9e9e67a2f 100644 --- a/cmd/xsDeploy_test.go +++ b/cmd/xsDeploy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/integration/contracts_test.go b/integration/contracts_test.go index 4bf3520b7..c43a290c5 100644 --- a/integration/contracts_test.go +++ b/integration/contracts_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package main import ( diff --git a/integration/integration_golang_test.go b/integration/integration_golang_test.go index d5a23c8ef..e9707dbce 100644 --- a/integration/integration_golang_test.go +++ b/integration/integration_golang_test.go @@ -30,7 +30,7 @@ func TestGolangIntegrationBuildProject1(t *testing.T) { container.assertHasOutput(t, "info golangBuild - running command: go install gotest.tools/gotestsum@latest", "info golangBuild - running command: go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest", - "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out ./...", + "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out -tags=unit ./...", "info golangBuild - DONE 8 tests", "info golangBuild - running command: go tool cover -html cover.out -o coverage.html", "info golangBuild - running command: gotestsum --junitfile TEST-integration.xml --jsonfile integration-report.out -- -tags=integration ./...", @@ -65,7 +65,7 @@ func TestGolangIntegrationBuildProject1MultiPackage(t *testing.T) { container.assertHasOutput(t, "info golangBuild - running command: go install gotest.tools/gotestsum@latest", "info golangBuild - running command: go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest", - "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out ./...", + "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out -tags=unit ./...", "info golangBuild - DONE 8 tests", "info golangBuild - running command: go tool cover -html cover.out -o coverage.html", "info golangBuild - running command: gotestsum --junitfile TEST-integration.xml --jsonfile integration-report.out -- -tags=integration ./...", @@ -103,7 +103,7 @@ func TestGolangIntegrationBuildProject2(t *testing.T) { container.assertHasNoOutput(t, "info golangBuild - running command: go install gotest.tools/gotestsum@latest", "info golangBuild - running command: go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest", - "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out ./...", + "info golangBuild - running command: gotestsum --junitfile TEST-go.xml --jsonfile unit-report.out -- -coverprofile=cover.out -tags=unit ./...", "info golangBuild - running command: go tool cover -html cover.out -o coverage.html", "info golangBuild - running command: gotestsum --junitfile TEST-integration.xml --jsonfile integration-report.out -- -tags=integration ./...", "info golangBuild - running command: cyclonedx-gomod mod -licenses -test -output bom-golang.xml", diff --git a/pkg/abap/aakaas/componentVersion_test.go b/pkg/abap/aakaas/componentVersion_test.go index e3c469958..cd08f0eef 100644 --- a/pkg/abap/aakaas/componentVersion_test.go +++ b/pkg/abap/aakaas/componentVersion_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package aakaas import ( diff --git a/pkg/abap/aakaas/productVersion_test.go b/pkg/abap/aakaas/productVersion_test.go index 35163adec..1b4d73991 100644 --- a/pkg/abap/aakaas/productVersion_test.go +++ b/pkg/abap/aakaas/productVersion_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package aakaas import ( diff --git a/pkg/abap/aakaas/targetVector_test.go b/pkg/abap/aakaas/targetVector_test.go index 07f81806e..b797f0c2d 100644 --- a/pkg/abap/aakaas/targetVector_test.go +++ b/pkg/abap/aakaas/targetVector_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package aakaas import ( diff --git a/pkg/abap/aakaas/versionables_test.go b/pkg/abap/aakaas/versionables_test.go index b9db0218e..816a5da46 100644 --- a/pkg/abap/aakaas/versionables_test.go +++ b/pkg/abap/aakaas/versionables_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package aakaas import ( diff --git a/pkg/abap/build/bfw_test.go b/pkg/abap/build/bfw_test.go index c269dc3b2..25dc9888e 100644 --- a/pkg/abap/build/bfw_test.go +++ b/pkg/abap/build/bfw_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package build import ( diff --git a/pkg/abap/build/connector_test.go b/pkg/abap/build/connector_test.go index e90295711..d3109f947 100644 --- a/pkg/abap/build/connector_test.go +++ b/pkg/abap/build/connector_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package build import ( diff --git a/pkg/abaputils/abaputils_test.go b/pkg/abaputils/abaputils_test.go index 647554b10..9ccd2fd4b 100644 --- a/pkg/abaputils/abaputils_test.go +++ b/pkg/abaputils/abaputils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package abaputils import ( diff --git a/pkg/abaputils/descriptor_test.go b/pkg/abaputils/descriptor_test.go index 257863229..5ece56d74 100644 --- a/pkg/abaputils/descriptor_test.go +++ b/pkg/abaputils/descriptor_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package abaputils import ( diff --git a/pkg/abaputils/manageGitRepositoryUtils_test.go b/pkg/abaputils/manageGitRepositoryUtils_test.go index abbeb92ca..20f72fd83 100644 --- a/pkg/abaputils/manageGitRepositoryUtils_test.go +++ b/pkg/abaputils/manageGitRepositoryUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package abaputils import ( diff --git a/pkg/ado/ado_test.go b/pkg/ado/ado_test.go index 8caf3c6b3..188acd27b 100644 --- a/pkg/ado/ado_test.go +++ b/pkg/ado/ado_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package ado import ( diff --git a/pkg/ans/ans_test.go b/pkg/ans/ans_test.go index a052c8214..fa585755c 100644 --- a/pkg/ans/ans_test.go +++ b/pkg/ans/ans_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package ans import ( diff --git a/pkg/ans/event_test.go b/pkg/ans/event_test.go index 0cc6f8cad..2411504e7 100644 --- a/pkg/ans/event_test.go +++ b/pkg/ans/event_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package ans import ( diff --git a/pkg/apim/APIMUtility_test.go b/pkg/apim/APIMUtility_test.go index 6bda1ef20..df7d7ecbd 100644 --- a/pkg/apim/APIMUtility_test.go +++ b/pkg/apim/APIMUtility_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package apim import ( diff --git a/pkg/blackduck/blackduck_test.go b/pkg/blackduck/blackduck_test.go index 7e220fcc6..3890950f5 100644 --- a/pkg/blackduck/blackduck_test.go +++ b/pkg/blackduck/blackduck_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package blackduck import ( diff --git a/pkg/blackduck/reporting_test.go b/pkg/blackduck/reporting_test.go index c8cc9afce..82018853d 100644 --- a/pkg/blackduck/reporting_test.go +++ b/pkg/blackduck/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package blackduck import ( diff --git a/pkg/buildsettings/buildSettings_test.go b/pkg/buildsettings/buildSettings_test.go index 24988df9b..7d135b97a 100644 --- a/pkg/buildsettings/buildSettings_test.go +++ b/pkg/buildsettings/buildSettings_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package buildsettings import ( diff --git a/pkg/certutils/certutils_test.go b/pkg/certutils/certutils_test.go index 9b866a135..f261090f5 100644 --- a/pkg/certutils/certutils_test.go +++ b/pkg/certutils/certutils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package certutils import ( diff --git a/pkg/checkmarx/checkmarx_test.go b/pkg/checkmarx/checkmarx_test.go index 1dc97019f..448416386 100644 --- a/pkg/checkmarx/checkmarx_test.go +++ b/pkg/checkmarx/checkmarx_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package checkmarx import ( diff --git a/pkg/checkmarx/cxxml_to_sarif_test.go b/pkg/checkmarx/cxxml_to_sarif_test.go index 1698830b2..0b1f3e5e9 100644 --- a/pkg/checkmarx/cxxml_to_sarif_test.go +++ b/pkg/checkmarx/cxxml_to_sarif_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package checkmarx import ( diff --git a/pkg/checkmarx/reporting_test.go b/pkg/checkmarx/reporting_test.go index b9c637f45..2a82a5b48 100644 --- a/pkg/checkmarx/reporting_test.go +++ b/pkg/checkmarx/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package checkmarx import ( diff --git a/pkg/cloudfoundry/CloudFoundry_test.go b/pkg/cloudfoundry/CloudFoundry_test.go index 5f3ead471..57aaf6362 100644 --- a/pkg/cloudfoundry/CloudFoundry_test.go +++ b/pkg/cloudfoundry/CloudFoundry_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cloudfoundry import ( diff --git a/pkg/cloudfoundry/ManifestUtils_test.go b/pkg/cloudfoundry/ManifestUtils_test.go index 8102ec718..c292d2db6 100644 --- a/pkg/cloudfoundry/ManifestUtils_test.go +++ b/pkg/cloudfoundry/ManifestUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cloudfoundry import ( diff --git a/pkg/cloudfoundry/Vars_test.go b/pkg/cloudfoundry/Vars_test.go index 9acc54bfe..66b74ee75 100644 --- a/pkg/cloudfoundry/Vars_test.go +++ b/pkg/cloudfoundry/Vars_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cloudfoundry import ( diff --git a/pkg/cnbutils/auth_test.go b/pkg/cnbutils/auth_test.go index 97d35dc44..24ed900d0 100644 --- a/pkg/cnbutils/auth_test.go +++ b/pkg/cnbutils/auth_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/bindings/bindings_test.go b/pkg/cnbutils/bindings/bindings_test.go index b06c320e7..f6af0066e 100644 --- a/pkg/cnbutils/bindings/bindings_test.go +++ b/pkg/cnbutils/bindings/bindings_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package bindings_test import ( diff --git a/pkg/cnbutils/buildpack_test.go b/pkg/cnbutils/buildpack_test.go index 1451ac707..a48027271 100644 --- a/pkg/cnbutils/buildpack_test.go +++ b/pkg/cnbutils/buildpack_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/copy_project_test.go b/pkg/cnbutils/copy_project_test.go index d7dc6ce25..abd706fa4 100644 --- a/pkg/cnbutils/copy_project_test.go +++ b/pkg/cnbutils/copy_project_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/env_test.go b/pkg/cnbutils/env_test.go index e407d814b..d3f350bb3 100644 --- a/pkg/cnbutils/env_test.go +++ b/pkg/cnbutils/env_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/order_test.go b/pkg/cnbutils/order_test.go index 6364075de..fa75e1170 100644 --- a/pkg/cnbutils/order_test.go +++ b/pkg/cnbutils/order_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/privacy/privacy_test.go b/pkg/cnbutils/privacy/privacy_test.go index 07d137072..525ee2239 100644 --- a/pkg/cnbutils/privacy/privacy_test.go +++ b/pkg/cnbutils/privacy/privacy_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package privacy_test import ( diff --git a/pkg/cnbutils/project/descriptor_test.go b/pkg/cnbutils/project/descriptor_test.go index 134720346..88cdbe17b 100644 --- a/pkg/cnbutils/project/descriptor_test.go +++ b/pkg/cnbutils/project/descriptor_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package project import ( diff --git a/pkg/cnbutils/project/metadata/metadata_test.go b/pkg/cnbutils/project/metadata/metadata_test.go index f11f851b2..6310d8067 100644 --- a/pkg/cnbutils/project/metadata/metadata_test.go +++ b/pkg/cnbutils/project/metadata/metadata_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package metadata import ( diff --git a/pkg/cnbutils/project/resolve_path_test.go b/pkg/cnbutils/project/resolve_path_test.go index 6d745dab9..5e02b7904 100644 --- a/pkg/cnbutils/project/resolve_path_test.go +++ b/pkg/cnbutils/project/resolve_path_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package project_test import ( diff --git a/pkg/cnbutils/registry/search_test.go b/pkg/cnbutils/registry/search_test.go index 5d445b5f5..47a8a3b1a 100644 --- a/pkg/cnbutils/registry/search_test.go +++ b/pkg/cnbutils/registry/search_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package registry import ( diff --git a/pkg/cnbutils/report_test.go b/pkg/cnbutils/report_test.go index bbafe1bfc..c82eee561 100644 --- a/pkg/cnbutils/report_test.go +++ b/pkg/cnbutils/report_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/cnbutils/target_image_test.go b/pkg/cnbutils/target_image_test.go index 23a357571..946b4d86e 100644 --- a/pkg/cnbutils/target_image_test.go +++ b/pkg/cnbutils/target_image_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cnbutils_test import ( diff --git a/pkg/codeql/codeql_test.go b/pkg/codeql/codeql_test.go index c0f64aee6..47456c179 100644 --- a/pkg/codeql/codeql_test.go +++ b/pkg/codeql/codeql_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package codeql import ( diff --git a/pkg/command/command_test.go b/pkg/command/command_test.go index ce84883e5..d12093edd 100644 --- a/pkg/command/command_test.go +++ b/pkg/command/command_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package command import ( diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index e497a160c..29b3d919e 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/defaults_test.go b/pkg/config/defaults_test.go index fbe26d141..11e048bce 100644 --- a/pkg/config/defaults_test.go +++ b/pkg/config/defaults_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/errors_test.go b/pkg/config/errors_test.go index dc05427e5..2cbf35895 100644 --- a/pkg/config/errors_test.go +++ b/pkg/config/errors_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/evaluation_test.go b/pkg/config/evaluation_test.go index 17c215531..ae42f07a0 100644 --- a/pkg/config/evaluation_test.go +++ b/pkg/config/evaluation_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/flags_test.go b/pkg/config/flags_test.go index 39ea31c4a..fcdf229e7 100644 --- a/pkg/config/flags_test.go +++ b/pkg/config/flags_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/interpolation/interpolation_test.go b/pkg/config/interpolation/interpolation_test.go index 0ae72e6be..c6c585d7b 100644 --- a/pkg/config/interpolation/interpolation_test.go +++ b/pkg/config/interpolation/interpolation_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package interpolation import ( diff --git a/pkg/config/reporting_test.go b/pkg/config/reporting_test.go index 46f935f58..687bb9770 100644 --- a/pkg/config/reporting_test.go +++ b/pkg/config/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/run_test.go b/pkg/config/run_test.go index 12b1502cb..98bbedd59 100644 --- a/pkg/config/run_test.go +++ b/pkg/config/run_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/stepmeta_test.go b/pkg/config/stepmeta_test.go index 46093149b..7d824fd2a 100644 --- a/pkg/config/stepmeta_test.go +++ b/pkg/config/stepmeta_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/config/validation/validation_test.go b/pkg/config/validation/validation_test.go index 362b165c8..f30fb37f1 100644 --- a/pkg/config/validation/validation_test.go +++ b/pkg/config/validation/validation_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package validation import ( diff --git a/pkg/config/vault_test.go b/pkg/config/vault_test.go index 0f41352fd..bc298e63c 100644 --- a/pkg/config/vault_test.go +++ b/pkg/config/vault_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package config import ( diff --git a/pkg/cpi/commonUtils_test.go b/pkg/cpi/commonUtils_test.go index 560a42fec..0e8795288 100644 --- a/pkg/cpi/commonUtils_test.go +++ b/pkg/cpi/commonUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cpi import ( diff --git a/pkg/docker/container_test.go b/pkg/docker/container_test.go index 6919d44da..d5b873c83 100644 --- a/pkg/docker/container_test.go +++ b/pkg/docker/container_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package docker import ( diff --git a/pkg/docker/docker_test.go b/pkg/docker/docker_test.go index c7788f7da..399651fd3 100644 --- a/pkg/docker/docker_test.go +++ b/pkg/docker/docker_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package docker import ( diff --git a/pkg/docker/multiarch_test.go b/pkg/docker/multiarch_test.go index dc5bc4638..7f254e3df 100644 --- a/pkg/docker/multiarch_test.go +++ b/pkg/docker/multiarch_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package docker import ( diff --git a/pkg/documentation/generator/defaults_test.go b/pkg/documentation/generator/defaults_test.go index 1277e701b..8fe7d9c9b 100644 --- a/pkg/documentation/generator/defaults_test.go +++ b/pkg/documentation/generator/defaults_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/documentation/generator/description_test.go b/pkg/documentation/generator/description_test.go index 4539b2199..aa4dd53aa 100644 --- a/pkg/documentation/generator/description_test.go +++ b/pkg/documentation/generator/description_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/documentation/generator/main_test.go b/pkg/documentation/generator/main_test.go index 41808182d..69f789a35 100644 --- a/pkg/documentation/generator/main_test.go +++ b/pkg/documentation/generator/main_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/documentation/generator/metadata_test.go b/pkg/documentation/generator/metadata_test.go index cecf3f43d..2612a9e2b 100644 --- a/pkg/documentation/generator/metadata_test.go +++ b/pkg/documentation/generator/metadata_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/documentation/generator/outputs_test.go b/pkg/documentation/generator/outputs_test.go index 7b437136e..b32c54e8c 100644 --- a/pkg/documentation/generator/outputs_test.go +++ b/pkg/documentation/generator/outputs_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/documentation/generator/parameters_test.go b/pkg/documentation/generator/parameters_test.go index 2e0a24f69..adc9deaff 100644 --- a/pkg/documentation/generator/parameters_test.go +++ b/pkg/documentation/generator/parameters_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package generator import ( diff --git a/pkg/fortify/fortify_test.go b/pkg/fortify/fortify_test.go index e343d4567..578398af1 100644 --- a/pkg/fortify/fortify_test.go +++ b/pkg/fortify/fortify_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package fortify import ( diff --git a/pkg/fortify/fpr_to_sarif_test.go b/pkg/fortify/fpr_to_sarif_test.go index 171a2048a..74b2473ed 100644 --- a/pkg/fortify/fpr_to_sarif_test.go +++ b/pkg/fortify/fpr_to_sarif_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package fortify import ( diff --git a/pkg/gcs/gcsClient_test.go b/pkg/gcs/gcsClient_test.go index 0ad5e6d0c..6b474bb53 100644 --- a/pkg/gcs/gcsClient_test.go +++ b/pkg/gcs/gcsClient_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package gcs import ( diff --git a/pkg/gcs/reporting_test.go b/pkg/gcs/reporting_test.go index 0941c8493..a52eb79d8 100644 --- a/pkg/gcs/reporting_test.go +++ b/pkg/gcs/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package gcs import ( diff --git a/pkg/gcs/targetFolderHandler_test.go b/pkg/gcs/targetFolderHandler_test.go index d386d4232..06e294fe9 100644 --- a/pkg/gcs/targetFolderHandler_test.go +++ b/pkg/gcs/targetFolderHandler_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package gcs import ( diff --git a/pkg/generator/helper/helper.go b/pkg/generator/helper/helper.go index fb86e643e..cf242683a 100644 --- a/pkg/generator/helper/helper.go +++ b/pkg/generator/helper/helper.go @@ -344,7 +344,10 @@ func {{ .StepName }}Metadata() config.StepData { ` // StepTestGoTemplate ... -const stepTestGoTemplate = `package cmd +const stepTestGoTemplate = `//go:build unit +// +build unit + +package cmd import ( "testing" diff --git a/pkg/generator/helper/helper_test.go b/pkg/generator/helper/helper_test.go index 9475a39e8..0f2bd5d2b 100644 --- a/pkg/generator/helper/helper_test.go +++ b/pkg/generator/helper/helper_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package helper import ( diff --git a/pkg/generator/helper/resources_test.go b/pkg/generator/helper/resources_test.go index 95a1a5eac..3fd473bec 100644 --- a/pkg/generator/helper/resources_test.go +++ b/pkg/generator/helper/resources_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package helper import ( diff --git a/pkg/generator/helper/testdata/TestProcessMetaFiles/test_code_generated.golden b/pkg/generator/helper/testdata/TestProcessMetaFiles/test_code_generated.golden index e0ff3eee0..5dcb76ff9 100644 --- a/pkg/generator/helper/testdata/TestProcessMetaFiles/test_code_generated.golden +++ b/pkg/generator/helper/testdata/TestProcessMetaFiles/test_code_generated.golden @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cmd import ( diff --git a/pkg/git/git_test.go b/pkg/git/git_test.go index 4bd0052b6..39e50e334 100644 --- a/pkg/git/git_test.go +++ b/pkg/git/git_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package git import ( diff --git a/pkg/github/github_test.go b/pkg/github/github_test.go index b61013e80..d58805435 100644 --- a/pkg/github/github_test.go +++ b/pkg/github/github_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package github import ( diff --git a/pkg/github/secret_test.go b/pkg/github/secret_test.go index 66c64e45d..1afb66b94 100644 --- a/pkg/github/secret_test.go +++ b/pkg/github/secret_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package github import ( diff --git a/pkg/goget/goget_test.go b/pkg/goget/goget_test.go index 29790d39c..ca4c4b30b 100644 --- a/pkg/goget/goget_test.go +++ b/pkg/goget/goget_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package goget import ( diff --git a/pkg/gradle/gradle_test.go b/pkg/gradle/gradle_test.go index 43acd36cc..0bdae89c0 100644 --- a/pkg/gradle/gradle_test.go +++ b/pkg/gradle/gradle_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package gradle import ( diff --git a/pkg/http/downloader_test.go b/pkg/http/downloader_test.go index 3fa7660ff..091e99e69 100644 --- a/pkg/http/downloader_test.go +++ b/pkg/http/downloader_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package http import ( diff --git a/pkg/http/http_test.go b/pkg/http/http_test.go index af4c8ec7f..6fcea3e0b 100644 --- a/pkg/http/http_test.go +++ b/pkg/http/http_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package http import ( diff --git a/pkg/influx/client_test.go b/pkg/influx/client_test.go index 5fb46406e..9f79b79e9 100644 --- a/pkg/influx/client_test.go +++ b/pkg/influx/client_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package influx import ( diff --git a/pkg/java/keytool_test.go b/pkg/java/keytool_test.go index 063a90e89..2585f4b1b 100644 --- a/pkg/java/keytool_test.go +++ b/pkg/java/keytool_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package java import ( diff --git a/pkg/jenkins/build_test.go b/pkg/jenkins/build_test.go index 7d4dd6fb7..d4db537dd 100644 --- a/pkg/jenkins/build_test.go +++ b/pkg/jenkins/build_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package jenkins import ( diff --git a/pkg/jenkins/credential_test.go b/pkg/jenkins/credential_test.go index f33237306..d40e8a207 100644 --- a/pkg/jenkins/credential_test.go +++ b/pkg/jenkins/credential_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package jenkins import ( diff --git a/pkg/jenkins/jenkins_test.go b/pkg/jenkins/jenkins_test.go index 5ac41848e..9375ec224 100644 --- a/pkg/jenkins/jenkins_test.go +++ b/pkg/jenkins/jenkins_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package jenkins import ( diff --git a/pkg/kubernetes/helm_test.go b/pkg/kubernetes/helm_test.go index b6debbb99..7f1b19a04 100644 --- a/pkg/kubernetes/helm_test.go +++ b/pkg/kubernetes/helm_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package kubernetes import ( diff --git a/pkg/kubernetes/utils_test.go b/pkg/kubernetes/utils_test.go index 4776ad3d6..09f89bf7d 100644 --- a/pkg/kubernetes/utils_test.go +++ b/pkg/kubernetes/utils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package kubernetes import ( diff --git a/pkg/log/ansHook_test.go b/pkg/log/ansHook_test.go index 03f646a4e..02b3c43d8 100644 --- a/pkg/log/ansHook_test.go +++ b/pkg/log/ansHook_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/collectorHook_test.go b/pkg/log/collectorHook_test.go index 5ba90483e..0c1f24a79 100644 --- a/pkg/log/collectorHook_test.go +++ b/pkg/log/collectorHook_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/errors_test.go b/pkg/log/errors_test.go index 3c017076b..92ced26cb 100644 --- a/pkg/log/errors_test.go +++ b/pkg/log/errors_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/fatalHook_test.go b/pkg/log/fatalHook_test.go index 6ba795389..eb1709eeb 100644 --- a/pkg/log/fatalHook_test.go +++ b/pkg/log/fatalHook_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/log_test.go b/pkg/log/log_test.go index dad72fb5b..cad581c44 100644 --- a/pkg/log/log_test.go +++ b/pkg/log/log_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/sentryHook_test.go b/pkg/log/sentryHook_test.go index 5deddf0c9..739644a5b 100644 --- a/pkg/log/sentryHook_test.go +++ b/pkg/log/sentryHook_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/log/writer_test.go b/pkg/log/writer_test.go index 1109b2ce6..53ac7deff 100644 --- a/pkg/log/writer_test.go +++ b/pkg/log/writer_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package log import ( diff --git a/pkg/malwarescan/malwarescan_test.go b/pkg/malwarescan/malwarescan_test.go index 733ba0503..43a9326a7 100644 --- a/pkg/malwarescan/malwarescan_test.go +++ b/pkg/malwarescan/malwarescan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package malwarescan import ( diff --git a/pkg/maven/maven_test.go b/pkg/maven/maven_test.go index 16d294888..ecfa97ff5 100644 --- a/pkg/maven/maven_test.go +++ b/pkg/maven/maven_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package maven import ( diff --git a/pkg/maven/model_test.go b/pkg/maven/model_test.go index 27a7a4858..06695efc1 100644 --- a/pkg/maven/model_test.go +++ b/pkg/maven/model_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package maven import ( diff --git a/pkg/maven/settings_test.go b/pkg/maven/settings_test.go index 8998f3e00..d0acdd37c 100644 --- a/pkg/maven/settings_test.go +++ b/pkg/maven/settings_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package maven import ( diff --git a/pkg/mock/dockerRunner_test.go b/pkg/mock/dockerRunner_test.go index 64ece7143..110179b4d 100644 --- a/pkg/mock/dockerRunner_test.go +++ b/pkg/mock/dockerRunner_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package mock import ( diff --git a/pkg/mock/example_dockerRunner_test.go b/pkg/mock/example_dockerRunner_test.go index 9766a1c9e..5e1030d76 100644 --- a/pkg/mock/example_dockerRunner_test.go +++ b/pkg/mock/example_dockerRunner_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package mock_test import ( diff --git a/pkg/mock/fileUtils_test.go b/pkg/mock/fileUtils_test.go index ba445745e..0eec7c2c7 100644 --- a/pkg/mock/fileUtils_test.go +++ b/pkg/mock/fileUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package mock import ( diff --git a/pkg/mock/httpClient_test.go b/pkg/mock/httpClient_test.go index 43a9c234c..0b6293df9 100644 --- a/pkg/mock/httpClient_test.go +++ b/pkg/mock/httpClient_test.go @@ -1,5 +1,5 @@ -//go:build !release -// +build !release +//go:build unit && !release +// +build unit,!release package mock diff --git a/pkg/multiarch/multiarch_test.go b/pkg/multiarch/multiarch_test.go index 83c75a964..1440efcf3 100644 --- a/pkg/multiarch/multiarch_test.go +++ b/pkg/multiarch/multiarch_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package multiarch import ( diff --git a/pkg/nexus/nexus_test.go b/pkg/nexus/nexus_test.go index 14abe8e03..47fb2e07a 100644 --- a/pkg/nexus/nexus_test.go +++ b/pkg/nexus/nexus_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package nexus import ( diff --git a/pkg/npm/config_test.go b/pkg/npm/config_test.go index de98b72c0..2ed6059a8 100644 --- a/pkg/npm/config_test.go +++ b/pkg/npm/config_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package npm import ( diff --git a/pkg/npm/npm_test.go b/pkg/npm/npm_test.go index 4193e54b4..f2c808f2c 100644 --- a/pkg/npm/npm_test.go +++ b/pkg/npm/npm_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package npm import ( diff --git a/pkg/npm/publish_test.go b/pkg/npm/publish_test.go index b5af797ff..df92fa1e7 100644 --- a/pkg/npm/publish_test.go +++ b/pkg/npm/publish_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package npm import ( diff --git a/pkg/orchestrator/azureDevOps_test.go b/pkg/orchestrator/azureDevOps_test.go index b832fe49d..117f175c8 100644 --- a/pkg/orchestrator/azureDevOps_test.go +++ b/pkg/orchestrator/azureDevOps_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/orchestrator/gitHubActions_test.go b/pkg/orchestrator/gitHubActions_test.go index 5fa5d1bff..b3f20f793 100644 --- a/pkg/orchestrator/gitHubActions_test.go +++ b/pkg/orchestrator/gitHubActions_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/orchestrator/jenkins_test.go b/pkg/orchestrator/jenkins_test.go index d65e62887..3b2c8c6e0 100644 --- a/pkg/orchestrator/jenkins_test.go +++ b/pkg/orchestrator/jenkins_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/orchestrator/orchestrator_test.go b/pkg/orchestrator/orchestrator_test.go index b7e6717db..5411f8f68 100644 --- a/pkg/orchestrator/orchestrator_test.go +++ b/pkg/orchestrator/orchestrator_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/orchestrator/testUtils_test.go b/pkg/orchestrator/testUtils_test.go index 3963538bb..2be39f16e 100644 --- a/pkg/orchestrator/testUtils_test.go +++ b/pkg/orchestrator/testUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/orchestrator/unknownOrchestrator_test.go b/pkg/orchestrator/unknownOrchestrator_test.go index d39caa45f..ee85e24f3 100644 --- a/pkg/orchestrator/unknownOrchestrator_test.go +++ b/pkg/orchestrator/unknownOrchestrator_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package orchestrator import ( diff --git a/pkg/piperenv/CPEMap_test.go b/pkg/piperenv/CPEMap_test.go index da048a06d..c90d45615 100644 --- a/pkg/piperenv/CPEMap_test.go +++ b/pkg/piperenv/CPEMap_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperenv import ( diff --git a/pkg/piperenv/artifact_test.go b/pkg/piperenv/artifact_test.go index 9653d0840..5d8b5693e 100644 --- a/pkg/piperenv/artifact_test.go +++ b/pkg/piperenv/artifact_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperenv import ( diff --git a/pkg/piperenv/environment_test.go b/pkg/piperenv/environment_test.go index f01665bf7..f46471883 100644 --- a/pkg/piperenv/environment_test.go +++ b/pkg/piperenv/environment_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperenv import ( diff --git a/pkg/piperenv/templating_test.go b/pkg/piperenv/templating_test.go index 15733fc0f..8d6433ee5 100644 --- a/pkg/piperenv/templating_test.go +++ b/pkg/piperenv/templating_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperenv import ( diff --git a/pkg/piperutils/credentials_test.go b/pkg/piperutils/credentials_test.go index 821dbba5d..b02479672 100644 --- a/pkg/piperutils/credentials_test.go +++ b/pkg/piperutils/credentials_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/fileUtils_test.go b/pkg/piperutils/fileUtils_test.go index 785ee3df8..5a27b3434 100644 --- a/pkg/piperutils/fileUtils_test.go +++ b/pkg/piperutils/fileUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/ioUtils_test.go b/pkg/piperutils/ioUtils_test.go index 222f84d2d..43a6470d4 100644 --- a/pkg/piperutils/ioUtils_test.go +++ b/pkg/piperutils/ioUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/maps_test.go b/pkg/piperutils/maps_test.go index 836b36cbf..f36ab43f5 100644 --- a/pkg/piperutils/maps_test.go +++ b/pkg/piperutils/maps_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/projectStructure_test.go b/pkg/piperutils/projectStructure_test.go index 5bde5a157..f45e74a23 100644 --- a/pkg/piperutils/projectStructure_test.go +++ b/pkg/piperutils/projectStructure_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/slices_test.go b/pkg/piperutils/slices_test.go index bcc4cd391..bd1042915 100644 --- a/pkg/piperutils/slices_test.go +++ b/pkg/piperutils/slices_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/stepResults_test.go b/pkg/piperutils/stepResults_test.go index eadb2c2e4..f7edec934 100644 --- a/pkg/piperutils/stepResults_test.go +++ b/pkg/piperutils/stepResults_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/strings_test.go b/pkg/piperutils/strings_test.go index 1c8af184a..a46f73131 100644 --- a/pkg/piperutils/strings_test.go +++ b/pkg/piperutils/strings_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/piperutils/templateUtils_test.go b/pkg/piperutils/templateUtils_test.go index ee5c664bf..421f13766 100644 --- a/pkg/piperutils/templateUtils_test.go +++ b/pkg/piperutils/templateUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package piperutils import ( diff --git a/pkg/protecode/analysis_test.go b/pkg/protecode/analysis_test.go index c97d0fb9c..89a7dff11 100644 --- a/pkg/protecode/analysis_test.go +++ b/pkg/protecode/analysis_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package protecode import ( diff --git a/pkg/protecode/protecode_test.go b/pkg/protecode/protecode_test.go index 70ef6832d..21f03aa08 100644 --- a/pkg/protecode/protecode_test.go +++ b/pkg/protecode/protecode_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package protecode import ( diff --git a/pkg/protecode/report_test.go b/pkg/protecode/report_test.go index 2e3297440..d69d4d1a0 100644 --- a/pkg/protecode/report_test.go +++ b/pkg/protecode/report_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package protecode import ( diff --git a/pkg/reporting/github_test.go b/pkg/reporting/github_test.go index 7e8e2c60d..a8674d826 100644 --- a/pkg/reporting/github_test.go +++ b/pkg/reporting/github_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package reporting import ( diff --git a/pkg/reporting/policyViolation_test.go b/pkg/reporting/policyViolation_test.go index 4e913df2e..457efddfa 100644 --- a/pkg/reporting/policyViolation_test.go +++ b/pkg/reporting/policyViolation_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package reporting import ( diff --git a/pkg/reporting/pullRequestReport_test.go b/pkg/reporting/pullRequestReport_test.go index f77f99043..6195444e2 100644 --- a/pkg/reporting/pullRequestReport_test.go +++ b/pkg/reporting/pullRequestReport_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package reporting import ( diff --git a/pkg/reporting/reporting_test.go b/pkg/reporting/reporting_test.go index c933cb0ac..f1a8f0d66 100644 --- a/pkg/reporting/reporting_test.go +++ b/pkg/reporting/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package reporting import ( diff --git a/pkg/reporting/securityVulnerability_test.go b/pkg/reporting/securityVulnerability_test.go index 891363533..df3071b56 100644 --- a/pkg/reporting/securityVulnerability_test.go +++ b/pkg/reporting/securityVulnerability_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package reporting import ( diff --git a/pkg/sonar/client_test.go b/pkg/sonar/client_test.go index 460a67877..a229f79dc 100644 --- a/pkg/sonar/client_test.go +++ b/pkg/sonar/client_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/sonar/componentService_test.go b/pkg/sonar/componentService_test.go index cc88eceda..2997e2c9a 100644 --- a/pkg/sonar/componentService_test.go +++ b/pkg/sonar/componentService_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/sonar/issueService_test.go b/pkg/sonar/issueService_test.go index 22cf273a2..45c8012e6 100644 --- a/pkg/sonar/issueService_test.go +++ b/pkg/sonar/issueService_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/sonar/report_test.go b/pkg/sonar/report_test.go index b1c832693..792c35a20 100644 --- a/pkg/sonar/report_test.go +++ b/pkg/sonar/report_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/sonar/sonar_test.go b/pkg/sonar/sonar_test.go index 84d54b96a..108223377 100644 --- a/pkg/sonar/sonar_test.go +++ b/pkg/sonar/sonar_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/sonar/taskService_test.go b/pkg/sonar/taskService_test.go index 219d863cb..6df77a877 100644 --- a/pkg/sonar/taskService_test.go +++ b/pkg/sonar/taskService_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package sonar import ( diff --git a/pkg/splunk/splunk_test.go b/pkg/splunk/splunk_test.go index 93e1feb4f..0e8813fce 100644 --- a/pkg/splunk/splunk_test.go +++ b/pkg/splunk/splunk_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package splunk import ( diff --git a/pkg/syft/syft_test.go b/pkg/syft/syft_test.go index 9906de081..bfc8e7378 100644 --- a/pkg/syft/syft_test.go +++ b/pkg/syft/syft_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package syft_test import ( diff --git a/pkg/telemetry/data_test.go b/pkg/telemetry/data_test.go index 7dfb955ef..a0f0b5293 100644 --- a/pkg/telemetry/data_test.go +++ b/pkg/telemetry/data_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package telemetry import ( diff --git a/pkg/telemetry/telemetry_test.go b/pkg/telemetry/telemetry_test.go index 5cb8db3f2..91b88a496 100644 --- a/pkg/telemetry/telemetry_test.go +++ b/pkg/telemetry/telemetry_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package telemetry import ( diff --git a/pkg/terraform/terraform_test.go b/pkg/terraform/terraform_test.go index 10e5bf028..49141c1fa 100644 --- a/pkg/terraform/terraform_test.go +++ b/pkg/terraform/terraform_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package terraform import ( diff --git a/pkg/tms/tmsClient_test.go b/pkg/tms/tmsClient_test.go index 971687aa5..b80f8f10d 100644 --- a/pkg/tms/tmsClient_test.go +++ b/pkg/tms/tmsClient_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package tms import ( diff --git a/pkg/toolrecord/toolrecord_test.go b/pkg/toolrecord/toolrecord_test.go index 0565cddf5..2ee14a88d 100644 --- a/pkg/toolrecord/toolrecord_test.go +++ b/pkg/toolrecord/toolrecord_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package toolrecord_test import ( diff --git a/pkg/transportrequest/cts/upload_test.go b/pkg/transportrequest/cts/upload_test.go index 0caf71350..7a7c3cdee 100644 --- a/pkg/transportrequest/cts/upload_test.go +++ b/pkg/transportrequest/cts/upload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package cts import ( diff --git a/pkg/transportrequest/gitutils_test.go b/pkg/transportrequest/gitutils_test.go index 9deede834..5359bfb69 100644 --- a/pkg/transportrequest/gitutils_test.go +++ b/pkg/transportrequest/gitutils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package transportrequest import ( diff --git a/pkg/transportrequest/rfc/upload_test.go b/pkg/transportrequest/rfc/upload_test.go index e8d02c4b7..43e16e842 100644 --- a/pkg/transportrequest/rfc/upload_test.go +++ b/pkg/transportrequest/rfc/upload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package rfc import ( diff --git a/pkg/transportrequest/solman/create_test.go b/pkg/transportrequest/solman/create_test.go index 548a47538..0723bd94d 100644 --- a/pkg/transportrequest/solman/create_test.go +++ b/pkg/transportrequest/solman/create_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package solman import ( diff --git a/pkg/transportrequest/solman/upload_test.go b/pkg/transportrequest/solman/upload_test.go index 6ebf39808..7c68842df 100644 --- a/pkg/transportrequest/solman/upload_test.go +++ b/pkg/transportrequest/solman/upload_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package solman import ( diff --git a/pkg/validation/validation_test.go b/pkg/validation/validation_test.go index d705e72da..533538128 100644 --- a/pkg/validation/validation_test.go +++ b/pkg/validation/validation_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package validation import ( diff --git a/pkg/vault/client_test.go b/pkg/vault/client_test.go index 8ea73fdfc..ac73fe18d 100644 --- a/pkg/vault/client_test.go +++ b/pkg/vault/client_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package vault import ( diff --git a/pkg/versioning/descriptorUtils_test.go b/pkg/versioning/descriptorUtils_test.go index 70de26d3b..fd6826a76 100644 --- a/pkg/versioning/descriptorUtils_test.go +++ b/pkg/versioning/descriptorUtils_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/docker_test.go b/pkg/versioning/docker_test.go index a0ded7c64..40eb99f85 100644 --- a/pkg/versioning/docker_test.go +++ b/pkg/versioning/docker_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/gradle_test.go b/pkg/versioning/gradle_test.go index 2a8c44a63..2f1eaa353 100644 --- a/pkg/versioning/gradle_test.go +++ b/pkg/versioning/gradle_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/helm_test.go b/pkg/versioning/helm_test.go index 1d1bcb832..92f52df29 100644 --- a/pkg/versioning/helm_test.go +++ b/pkg/versioning/helm_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/inifile_test.go b/pkg/versioning/inifile_test.go index c94c27ab7..8c8a959c4 100644 --- a/pkg/versioning/inifile_test.go +++ b/pkg/versioning/inifile_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/jsonfile_test.go b/pkg/versioning/jsonfile_test.go index 158301c2a..c266a82f5 100644 --- a/pkg/versioning/jsonfile_test.go +++ b/pkg/versioning/jsonfile_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/maven_test.go b/pkg/versioning/maven_test.go index b8fcc0377..3bbc22279 100644 --- a/pkg/versioning/maven_test.go +++ b/pkg/versioning/maven_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/pip_test.go b/pkg/versioning/pip_test.go index da07b80e7..2fedcd0a2 100644 --- a/pkg/versioning/pip_test.go +++ b/pkg/versioning/pip_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/properties_test.go b/pkg/versioning/properties_test.go index 7c256c6aa..1ae62e959 100644 --- a/pkg/versioning/properties_test.go +++ b/pkg/versioning/properties_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/versionfile_test.go b/pkg/versioning/versionfile_test.go index 1c9e3ad87..9f80f1b62 100644 --- a/pkg/versioning/versionfile_test.go +++ b/pkg/versioning/versionfile_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/versioningModel_test.go b/pkg/versioning/versioningModel_test.go index 73aee043f..a29a55041 100644 --- a/pkg/versioning/versioningModel_test.go +++ b/pkg/versioning/versioningModel_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/versioning_test.go b/pkg/versioning/versioning_test.go index 3f27271f6..1cb335183 100644 --- a/pkg/versioning/versioning_test.go +++ b/pkg/versioning/versioning_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/versioning/yamlfile_test.go b/pkg/versioning/yamlfile_test.go index 0121f88ff..b2f648328 100644 --- a/pkg/versioning/yamlfile_test.go +++ b/pkg/versioning/yamlfile_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package versioning import ( diff --git a/pkg/whitesource/configHelper_test.go b/pkg/whitesource/configHelper_test.go index 07f835abb..b4c9bc79b 100644 --- a/pkg/whitesource/configHelper_test.go +++ b/pkg/whitesource/configHelper_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/reporting_test.go b/pkg/whitesource/reporting_test.go index 04f80bb1a..cb52cb68a 100644 --- a/pkg/whitesource/reporting_test.go +++ b/pkg/whitesource/reporting_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanMTA_test.go b/pkg/whitesource/scanMTA_test.go index 9c2d75050..5ca09a5f9 100644 --- a/pkg/whitesource/scanMTA_test.go +++ b/pkg/whitesource/scanMTA_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanMaven_test.go b/pkg/whitesource/scanMaven_test.go index a4ca1de72..14658edeb 100644 --- a/pkg/whitesource/scanMaven_test.go +++ b/pkg/whitesource/scanMaven_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanNPM_test.go b/pkg/whitesource/scanNPM_test.go index 7dee6f703..40c92c25d 100644 --- a/pkg/whitesource/scanNPM_test.go +++ b/pkg/whitesource/scanNPM_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanPolling_test.go b/pkg/whitesource/scanPolling_test.go index 668f6d515..2dd3ccae7 100644 --- a/pkg/whitesource/scanPolling_test.go +++ b/pkg/whitesource/scanPolling_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanReports_test.go b/pkg/whitesource/scanReports_test.go index da7c5cb27..aecfabc1b 100644 --- a/pkg/whitesource/scanReports_test.go +++ b/pkg/whitesource/scanReports_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scanUA_test.go b/pkg/whitesource/scanUA_test.go index 017921d87..238a25e61 100644 --- a/pkg/whitesource/scanUA_test.go +++ b/pkg/whitesource/scanUA_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/scan_test.go b/pkg/whitesource/scan_test.go index 7b019b466..15eda7d5c 100644 --- a/pkg/whitesource/scan_test.go +++ b/pkg/whitesource/scan_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/whitesource/whitesource_test.go b/pkg/whitesource/whitesource_test.go index a5e95cea9..424b1d026 100644 --- a/pkg/whitesource/whitesource_test.go +++ b/pkg/whitesource/whitesource_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package whitesource import ( diff --git a/pkg/xsuaa/xsuaa_test.go b/pkg/xsuaa/xsuaa_test.go index dee617c2e..2e6be6276 100644 --- a/pkg/xsuaa/xsuaa_test.go +++ b/pkg/xsuaa/xsuaa_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package xsuaa import ( diff --git a/pkg/yaml/yamlUtil_test.go b/pkg/yaml/yamlUtil_test.go index 4638dda5e..f1bc7afb8 100644 --- a/pkg/yaml/yamlUtil_test.go +++ b/pkg/yaml/yamlUtil_test.go @@ -1,3 +1,6 @@ +//go:build unit +// +build unit + package yaml import ( diff --git a/resources/metadata/golangBuild.yaml b/resources/metadata/golangBuild.yaml index 7a736621d..58bedb1f8 100644 --- a/resources/metadata/golangBuild.yaml +++ b/resources/metadata/golangBuild.yaml @@ -164,7 +164,7 @@ spec: - PARAMETERS - name: runTests type: bool - description: Activates execution of tests using [gotestsum](https://github.com/gotestyourself/gotestsum). + description: Activates execution of tests using [gotestsum](https://github.com/gotestyourself/gotestsum). Tag Go unit tests with 'unit' build tag to exclude them using `--runTests=false` default: true scope: - STEPS