Skip to content

Postgres test fails - UTC timezone #4461

@johnvan7

Description

@johnvan7

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

2.44.0

Storage Type

Postgres

Installation Type

Binary

Expected Behavior

$ export DEX_POSTGRES_HOST="127.0.0.1"

$ make testall
...
PASS

Actual Behavior

$ export DEX_POSTGRES_HOST="127.0.0.1"

$ make testall
...
=== RUN   TestPostgres/DeviceRequestCRUD
    conformance.go:1015: 
        	Error Trace:	/home/user/repos/dex/storage/conformance/conformance.go:1015
        	            				/home/user/repos/dex/storage/conformance/conformance.go:31
        	Error:      	Not equal: 
        	            	expected: storage.DeviceRequest{UserCode:"WPDP-KLRP", DeviceCode:"ottfednbgoqsgxee3svxcgtrh", ClientID:"client1", ClientSecret:"secret1", Scopes:[]string{"openid", "email"}, Expiry:time.Date(2125, time.December, 12, 14, 11, 18, 0, time.UTC)}
        	            	actual  : storage.DeviceRequest{UserCode:"WPDP-KLRP", DeviceCode:"ottfednbgoqsgxee3svxcgtrh", ClientID:"client1", ClientSecret:"secret1", Scopes:[]string{"openid", "email"}, Expiry:time.Date(2125, time.December, 12, 14, 11, 18, 0, time.Location("Etc/UTC"))}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -12,3 +12,28 @@
        	            	   ext: (int64) 67056819078,
        	            	-  loc: (*time.Location)(<nil>)
        	            	+  loc: (*time.Location)({
        	            	+   name: (string) (len=7) "Etc/UTC",
        	            	+   zone: ([]time.zone) (len=1) {
        	            	+    (time.zone) {
        	            	+     name: (string) (len=3) "UTC",
        	            	+     offset: (int) 0,
        	            	+     isDST: (bool) false
        	            	+    }
        	            	+   },
        	            	+   tx: ([]time.zoneTrans) (len=1) {
        	            	+    (time.zoneTrans) {
        	            	+     when: (int64) -9223372036854775808,
        	            	+     index: (uint8) 0,
        	            	+     isstd: (bool) false,
        	            	+     isutc: (bool) false
        	            	+    }
        	            	+   },
        	            	+   extend: (string) (len=4) "UTC0",
        	            	+   cacheStart: (int64) -9223372036854775808,
        	            	+   cacheEnd: (int64) 9223372036854775807,
        	            	+   cacheZone: (*time.zone)({
        	            	+    name: (string) (len=3) "UTC",
        	            	+    offset: (int) 0,
        	            	+    isDST: (bool) false
        	            	+   })
        	            	+  })
        	            	  }
        	Test:       	TestPostgres/DeviceRequestCRUD
...
FAIL
make: *** [Makefile:131: testrace] Error 1

Steps To Reproduce

No response

Additional Information

No response

Configuration

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions