diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e34bf39..c7d34bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: - build - deploy-prod -image: buildtool/build-tools:0.0.14 +image: buildtool/build-tools:${BUILDTOOLS_VERSION} services: - docker:dind diff --git a/pkg/main_test.go b/pkg/main_test.go index c35b59a..ba0f7ac 100644 --- a/pkg/main_test.go +++ b/pkg/main_test.go @@ -43,7 +43,7 @@ func Test_parse(t *testing.T) { args: args{ url: "dalarna.html", }, - want: expectedEventsDalarna, + want: expectedEventsDalarna, wantErr: false, }, { @@ -51,7 +51,7 @@ func Test_parse(t *testing.T) { args: args{ url: "dalarna2.html", }, - want: expectedEventsDalarna, + want: expectedEventsDalarna, wantErr: false, }, { @@ -59,7 +59,7 @@ func Test_parse(t *testing.T) { args: args{ url: "dalarna3.html", }, - want: expectedEventsDalarna, + want: expectedEventsDalarna, wantErr: false, }, { @@ -67,7 +67,7 @@ func Test_parse(t *testing.T) { args: args{ url: "gotland.html", }, - want: nil, + want: nil, wantErr: false, }, { @@ -75,7 +75,7 @@ func Test_parse(t *testing.T) { args: args{ url: "uppsala.html", }, - want: expectedEventsUppsala, + want: expectedEventsUppsala, wantErr: false, }, } @@ -127,6 +127,9 @@ func Test_parse(t *testing.T) { func date(str string) LocalDate { t, _ := time.ParseInLocation("2006-01-02", str, time.Now().Location()) + if t.Year() == 2020 { + t = time.Date(time.Now().Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location()) + } return LocalDate(t) }