Skip to content

Commit c9c54d3

Browse files
committed
fix tests: use UTC timestamps and skip cookiejar example in CI
1 parent 63aaa71 commit c9c54d3

8 files changed

Lines changed: 16 additions & 14 deletions

File tree

browser/dillo/dillo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestReadCookies(t *testing.T) {
2424
}
2525

2626
// timezone
27-
tz := time.Local
27+
tz := time.UTC
2828

2929
c := cookies[0]
3030
if c.Domain != ".google.com" {
@@ -36,7 +36,7 @@ func TestReadCookies(t *testing.T) {
3636
if c.Path != "/" {
3737
t.Errorf("c.Path=%q", c.Path)
3838
}
39-
if !c.Expires.Equal(time.Date(2021, 4, 16, 13, 46, 2, 0, tz)) {
39+
if !c.Expires.Equal(time.Date(2021, 4, 16, 11, 46, 2, 0, tz)) {
4040
t.Errorf("c.Expires=%q", c.Expires)
4141
}
4242
if c.Secure {

browser/elinks/elinks_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestReadCookies(t *testing.T) {
2424
}
2525

2626
// timezone
27-
tz := time.Local
27+
tz := time.UTC
2828

2929
c := cookies[0]
3030
if c.Domain != "google.de" {
@@ -36,7 +36,7 @@ func TestReadCookies(t *testing.T) {
3636
if c.Path != "/" {
3737
t.Errorf("c.Path=%q", c.Path)
3838
}
39-
if !c.Expires.Equal(time.Date(2021, 4, 16, 12, 0, 45, 0, tz)) {
39+
if !c.Expires.Equal(time.Date(2021, 4, 16, 10, 0, 45, 0, tz)) {
4040
t.Errorf("c.Expires=%q", c.Expires)
4141
}
4242
if c.Secure {

browser/konqueror/konqueror_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestReadCookies(t *testing.T) {
2424
}
2525

2626
// timezone
27-
tz := time.Local
27+
tz := time.UTC
2828

2929
c := cookies[1]
3030
if c.Domain != ".google.de" {
@@ -36,7 +36,7 @@ func TestReadCookies(t *testing.T) {
3636
if c.Path != "/" {
3737
t.Errorf("c.Path=%q", c.Path)
3838
}
39-
if !c.Expires.Equal(time.Date(2038, 1, 10, 8, 59, 59, 0, tz)) {
39+
if !c.Expires.Equal(time.Date(2038, 1, 10, 7, 59, 59, 0, tz)) {
4040
t.Errorf("c.Expires=%q", c.Expires)
4141
}
4242
if !c.Secure {

browser/lynx/lynx_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestReadCookies(t *testing.T) {
3131
}
3232

3333
// timezone
34-
tz := time.Local
34+
tz := time.UTC
3535

3636
c := cookies[0]
3737
if c.Domain != "google.de" {
@@ -43,7 +43,7 @@ func TestReadCookies(t *testing.T) {
4343
if c.Path != "/" {
4444
t.Errorf("c.Path=%q", c.Path)
4545
}
46-
if !c.Expires.Equal(time.Date(2021, 4, 16, 10, 38, 33, 0, tz)) {
46+
if !c.Expires.Equal(time.Date(2021, 4, 16, 8, 38, 33, 0, tz)) {
4747
t.Errorf("c.Expires=%q", c.Expires)
4848
}
4949
if c.Secure {

browser/netscape/netscape_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestReadCookies(t *testing.T) {
2828
}
2929

3030
// timezone
31-
tz := time.Local
31+
tz := time.UTC
3232

3333
c := cookies[1]
3434
if c.Domain != ".google.de" {
@@ -40,7 +40,7 @@ func TestReadCookies(t *testing.T) {
4040
if c.Path != "/" {
4141
t.Errorf("c.Path=%q", c.Path)
4242
}
43-
if !c.Expires.Equal(time.Date(2021, 4, 16, 15, 33, 4, 0, tz)) {
43+
if !c.Expires.Equal(time.Date(2021, 4, 16, 13, 33, 4, 0, tz)) {
4444
t.Errorf("c.Expires=%q", c.Expires)
4545
}
4646
if c.Secure {

browser/uzbl/uzbl_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestReadCookies(t *testing.T) {
2424
}
2525

2626
// timezone
27-
tz := time.Local
27+
tz := time.UTC
2828

2929
c := cookies[0]
3030
if c.Domain != ".google.de" {
@@ -36,7 +36,7 @@ func TestReadCookies(t *testing.T) {
3636
if c.Path != "/" {
3737
t.Errorf("c.Path=%q", c.Path)
3838
}
39-
if !c.Expires.Equal(time.Date(2021, 4, 17, 18, 22, 55, 0, tz)) {
39+
if !c.Expires.Equal(time.Date(2021, 4, 17, 16, 22, 55, 0, tz)) {
4040
t.Errorf("c.Expires=%q", c.Expires)
4141
}
4242
if c.Secure {

browser/w3m/w3m_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestReadCookies(t *testing.T) {
2424
}
2525

2626
// timezone
27-
tz := time.Local
27+
tz := time.UTC
2828

2929
c := cookies[0]
3030
if c.Domain != ".google.de" {
@@ -36,7 +36,7 @@ func TestReadCookies(t *testing.T) {
3636
if c.Path != "/complete/search" {
3737
t.Errorf("c.Path=%q", c.Path)
3838
}
39-
if !c.Expires.Equal(time.Date(2021, 4, 13, 10, 13, 04, 0, tz)) {
39+
if !c.Expires.Equal(time.Date(2021, 4, 13, 8, 13, 04, 0, tz)) {
4040
t.Errorf("c.Expires=%q", c.Expires)
4141
}
4242
if c.Secure {

cookiejar_example_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build example
2+
13
package kooky_test
24

35
import (

0 commit comments

Comments
 (0)