1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-16 05:16:08 +02:00

Update abaputils.go (#1949)

* Update abaputils.go

* changed to versionYAML

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
This commit is contained in:
rosemarieB 2020-08-21 16:02:46 +02:00 committed by GitHub
parent 04b8a5cbd7
commit 67feb87b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 16 deletions

View File

@ -21,9 +21,7 @@ import (
"github.com/pkg/errors"
)
/*
AbapUtils Struct
*/
// AbapUtils Struct
type AbapUtils struct {
Exec command.ExecRunner
Intervall time.Duration
@ -297,14 +295,15 @@ type AbapBinding struct {
// AddonDescriptor contains fields about the addonProduct
type AddonDescriptor struct {
AddonProduct string `json:"addonProduct"`
AddonVersion string `json:"addonVersion"`
AddonUniqueID string `json:"addonUniqueID"`
CustomerID interface{} `json:"customerID"`
AddonSpsLevel string
AddonPatchLevel string
TargetVectorID string
Repositories []Repository `json:"repositories"`
AddonProduct string `json:"addonProduct"`
AddonVersionYAML string `json:"addonVersion"`
AddonVersion string
AddonUniqueID string `json:"addonUniqueID"`
CustomerID interface{} `json:"customerID"`
AddonSpsLevel string
AddonPatchLevel string
TargetVectorID string
Repositories []Repository `json:"repositories"`
}
// Repository contains fields for the repository/component version
@ -312,8 +311,8 @@ type Repository struct {
Name string `json:"name"`
Tag string `json:"tag"`
Branch string `json:"branch"`
Version string `json:"version"`
VersionOtherFormat string
VersionYAML string `json:"version"`
Version string
PackageName string
PackageType string
SpsLevel string

View File

@ -286,7 +286,7 @@ repositories:
addonDescriptor, err := ReadAddonDescriptor("filename.yaml")
assert.NoError(t, err)
assert.Equal(t, `/DMO/myAddonProduct`, addonDescriptor.AddonProduct)
assert.Equal(t, `3.1.4`, addonDescriptor.AddonVersion)
assert.Equal(t, `3.1.4`, addonDescriptor.AddonVersionYAML)
assert.Equal(t, `myAddonId`, addonDescriptor.AddonUniqueID)
assert.Equal(t, float64(1234), addonDescriptor.CustomerID)
assert.Equal(t, ``, addonDescriptor.AddonSpsLevel)
@ -296,8 +296,8 @@ repositories:
assert.Equal(t, `rel-2.1.1-build-0001`, addonDescriptor.Repositories[1].Tag)
assert.Equal(t, `branchA`, addonDescriptor.Repositories[0].Branch)
assert.Equal(t, `branchB`, addonDescriptor.Repositories[1].Branch)
assert.Equal(t, `1.0.1`, addonDescriptor.Repositories[0].Version)
assert.Equal(t, `2.1.1`, addonDescriptor.Repositories[1].Version)
assert.Equal(t, `1.0.1`, addonDescriptor.Repositories[0].VersionYAML)
assert.Equal(t, `2.1.1`, addonDescriptor.Repositories[1].VersionYAML)
assert.Equal(t, ``, addonDescriptor.Repositories[0].SpsLevel)
assert.Equal(t, ``, addonDescriptor.Repositories[1].SpsLevel)
})