Skip to content

Commit

Permalink
Merge pull request #54 from ozontech/issue-53
Browse files Browse the repository at this point in the history
[ISSUE-53] fix empty body in curl, add some docs
  • Loading branch information
siller174 authored Nov 23, 2023
2 parents 0c74c67 + efd35df commit df2546e
Show file tree
Hide file tree
Showing 7 changed files with 359 additions and 359 deletions.
110 changes: 55 additions & 55 deletions allure.go
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
package cute

func (it *cute) setAllureInformation(t allureProvider) {
func (qt *cute) setAllureInformation(t allureProvider) {
// Log main vars to allureProvider
it.setLabelsAllure(t)
it.setInfoAllure(t)
it.setLinksAllure(t)
qt.setLabelsAllure(t)
qt.setInfoAllure(t)
qt.setLinksAllure(t)
}

func (it *cute) setLinksAllure(t linksAllureProvider) {
if it.allureLinks.issue != "" {
t.SetIssue(it.allureLinks.issue)
func (qt *cute) setLinksAllure(t linksAllureProvider) {
if qt.allureLinks.issue != "" {
t.SetIssue(qt.allureLinks.issue)
}
if it.allureLinks.testCase != "" {
t.SetTestCase(it.allureLinks.testCase)
if qt.allureLinks.testCase != "" {

Check failure on line 14 in allure.go

View workflow job for this annotation

GitHub Actions / golangci-lint

if statements should only be cuddled with assignments (wsl)
t.SetTestCase(qt.allureLinks.testCase)
}
if it.allureLinks.link != nil {
t.Link(it.allureLinks.link)
if qt.allureLinks.link != nil {

Check failure on line 17 in allure.go

View workflow job for this annotation

GitHub Actions / golangci-lint

if statements should only be cuddled with assignments (wsl)
t.Link(qt.allureLinks.link)
}
if it.allureLinks.tmsLink != "" {
t.TmsLink(it.allureLinks.tmsLink)
if qt.allureLinks.tmsLink != "" {
t.TmsLink(qt.allureLinks.tmsLink)
}
if len(it.allureLinks.tmsLinks) > 0 {
t.TmsLinks(it.allureLinks.tmsLinks...)
if len(qt.allureLinks.tmsLinks) > 0 {
t.TmsLinks(qt.allureLinks.tmsLinks...)
}
}

func (it *cute) setLabelsAllure(t labelsAllureProvider) {
if it.allureLabels.id != "" {
t.ID(it.allureLabels.id)
func (qt *cute) setLabelsAllure(t labelsAllureProvider) {
if qt.allureLabels.id != "" {
t.ID(qt.allureLabels.id)
}
if it.allureLabels.suiteLabel != "" {
t.AddSuiteLabel(it.allureLabels.suiteLabel)
if qt.allureLabels.suiteLabel != "" {
t.AddSuiteLabel(qt.allureLabels.suiteLabel)
}
if it.allureLabels.subSuite != "" {
t.AddSubSuite(it.allureLabels.subSuite)
if qt.allureLabels.subSuite != "" {
t.AddSubSuite(qt.allureLabels.subSuite)
}
if it.allureLabels.parentSuite != "" {
t.AddParentSuite(it.allureLabels.parentSuite)
if qt.allureLabels.parentSuite != "" {
t.AddParentSuite(qt.allureLabels.parentSuite)
}
if it.allureLabels.story != "" {
t.Story(it.allureLabels.story)
if qt.allureLabels.story != "" {
t.Story(qt.allureLabels.story)
}
if it.allureLabels.tag != "" {
t.Tag(it.allureLabels.tag)
if qt.allureLabels.tag != "" {
t.Tag(qt.allureLabels.tag)
}
if it.allureLabels.allureID != "" {
t.AllureID(it.allureLabels.allureID)
if qt.allureLabels.allureID != "" {
t.AllureID(qt.allureLabels.allureID)
}
if it.allureLabels.severity != "" {
t.Severity(it.allureLabels.severity)
if qt.allureLabels.severity != "" {
t.Severity(qt.allureLabels.severity)
}
if it.allureLabels.owner != "" {
t.Owner(it.allureLabels.owner)
if qt.allureLabels.owner != "" {
t.Owner(qt.allureLabels.owner)
}
if it.allureLabels.lead != "" {
t.Lead(it.allureLabels.lead)
if qt.allureLabels.lead != "" {
t.Lead(qt.allureLabels.lead)
}
if it.allureLabels.label != nil {
t.Label(it.allureLabels.label)
if qt.allureLabels.label != nil {
t.Label(qt.allureLabels.label)
}
if len(it.allureLabels.labels) != 0 {
t.Labels(it.allureLabels.labels...)
if len(qt.allureLabels.labels) != 0 {
t.Labels(qt.allureLabels.labels...)
}
if it.allureLabels.feature != "" {
t.Feature(it.allureLabels.feature)
if qt.allureLabels.feature != "" {
t.Feature(qt.allureLabels.feature)
}
if it.allureLabels.epic != "" {
t.Epic(it.allureLabels.epic)
if qt.allureLabels.epic != "" {
t.Epic(qt.allureLabels.epic)
}
if len(it.allureLabels.tags) != 0 {
t.Tags(it.allureLabels.tags...)
if len(qt.allureLabels.tags) != 0 {
t.Tags(qt.allureLabels.tags...)
}
if it.allureLabels.layer != "" {
t.Layer(it.allureLabels.layer)
if qt.allureLabels.layer != "" {
t.Layer(qt.allureLabels.layer)
}
}

func (it *cute) setInfoAllure(t infoAllureProvider) {
if it.allureInfo.title != "" {
t.Title(it.allureInfo.title)
func (qt *cute) setInfoAllure(t infoAllureProvider) {
if qt.allureInfo.title != "" {
t.Title(qt.allureInfo.title)
}
if it.allureInfo.description != "" {
t.Description(it.allureInfo.description)
if qt.allureInfo.description != "" {
t.Description(qt.allureInfo.description)
}
if it.allureInfo.stage != "" {
t.Stage(it.allureInfo.stage)
if qt.allureInfo.stage != "" {
t.Stage(qt.allureInfo.stage)
}
}
Loading

0 comments on commit df2546e

Please sign in to comment.