1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-11-06 09:09:19 +02:00

abapEnvironmentAssemblePackages store file in workspace instead of cpe (#3232)

* initial refac

* fix unit test, no publish

* fix typo
This commit is contained in:
tiloKo
2021-11-02 11:00:01 +01:00
committed by GitHub
parent 3ee4339af1
commit 9464b345d0
6 changed files with 86 additions and 49 deletions

View File

@@ -323,6 +323,11 @@ func (c *ClientMock) SendRequest(method, url string, bdy io.Reader, hdr http.Hea
}, c.Error
}
// DownloadFile : Empty file download
func (c *ClientMock) DownloadFile(url, filename string, header http.Header, cookies []*http.Cookie) error {
return nil
}
// AUtilsMock mock
type AUtilsMock struct {
ReturnedConnectionDetailsHTTP ConnectionDetailsHTTP

View File

@@ -137,6 +137,11 @@ func (me *AddonDescriptor) initFromJSON(JSON []byte) error {
return json.Unmarshal(JSON, me)
}
// initFromJSON : Init from json string
func (me *AddonDescriptor) InitFromJSONstring(JSONstring string) error {
return me.initFromJSON([]byte(JSONstring))
}
// AsJSON : dito
func (me *AddonDescriptor) AsJSON() []byte {
//hopefully no errors should happen here or they are covered by the users unit tests
@@ -144,6 +149,11 @@ func (me *AddonDescriptor) AsJSON() []byte {
return jsonBytes
}
// AsJSONstring : dito
func (me *AddonDescriptor) AsJSONstring() string {
return string(me.AsJSON())
}
// SetRepositories : dito
func (me *AddonDescriptor) SetRepositories(Repositories []Repository) {
me.Repositories = Repositories