1
0
mirror of https://github.com/newrelic-forks/golang-jenkins.git synced 2026-06-18 20:15:04 +02:00

Fixed bug when creating a view. The status column wasn't set properly since the xml tag name was wrong

This commit is contained in:
Dennis Leon
2015-09-10 15:15:32 -07:00
parent 4f37d699fe
commit 9271581d41
2 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -40,10 +40,12 @@ func TestAddJobToView(t *testing.T) {
GlobalSettings: JobSettings{Class: "jenkins.mvn.DefaultSettingsProvider"},
}
newJobName := fmt.Sprintf("test-with-view-%d", time.Now().UnixNano())
newViewName := fmt.Sprintf("test-view-%d", time.Now().UnixNano())
jenkins.CreateJob(jobItem, newJobName)
jenkins.CreateView(NewListView(newViewName))
job := Job{Name: newJobName}
err := jenkins.AddJobToView("test", job)
err := jenkins.AddJobToView(newViewName, job)
if err != nil {
t.Errorf("error %v\n", err)
+7 -7
View File
@@ -24,24 +24,24 @@ type Columns struct {
}
type StatusColumn struct {
XMLName xml.Name `xml:"hudson.view.StatusColumn"`
XMLName xml.Name `xml:"hudson.views.StatusColumn"`
}
type WeatherColumn struct {
XMLName xml.Name `xml:"hudson.view.WeatherColumn"`
XMLName xml.Name `xml:"hudson.views.WeatherColumn"`
}
type JobColumn struct {
XMLName xml.Name `xml:"hudson.view.JobColumn"`
XMLName xml.Name `xml:"hudson.views.JobColumn"`
}
type LastSuccessColumn struct {
XMLName xml.Name `xml:"hudson.view.LastSuccessColumn"`
XMLName xml.Name `xml:"hudson.views.LastSuccessColumn"`
}
type LastFailureColumn struct {
XMLName xml.Name `xml:"hudson.view.LastFailureColumn"`
XMLName xml.Name `xml:"hudson.views.LastFailureColumn"`
}
type LastDurationColumn struct {
XMLName xml.Name `xml:"hudson.view.LastDurationColumn"`
XMLName xml.Name `xml:"hudson.views.LastDurationColumn"`
}
type BuildButtonColumn struct {
XMLName xml.Name `xml:"hudson.view.BuildButtonColumn"`
XMLName xml.Name `xml:"hudson.views.BuildButtonColumn"`
}