Skip to content

Commit

Permalink
Switch the TZ to UTC temporarily for running the News tests (#2121)
Browse files Browse the repository at this point in the history
* switch the TZ to UTC temporarily for running the tests

* Remove unnecessary environment reset

* Set test specific environment.

Co-authored-by: Jo <me@jguer.space>

---------

Co-authored-by: Jo <me@jguer.space>
  • Loading branch information
tchaudhry91 and Jguer committed Apr 26, 2023
1 parent 822b11b commit 15400c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/news/news_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func TestPrintNewsFeed(t *testing.T) {
{name: "latest-quiet", args: args{bottomUp: true, cutOffDate: lastNewsTime, all: false, quiet: true}, wantErr: false},
{name: "latest-quiet-topdown", args: args{bottomUp: false, cutOffDate: lastNewsTime, all: false, quiet: true}, wantErr: false},
}
t.Setenv("TZ", "UTC")
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 15400c5

Please sign in to comment.