Skip to content

Commit

Permalink
test: resolve time locality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 19, 2021
1 parent 67ae276 commit 53b8b2a
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion selfservice/strategy/lookup/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (c *CredentialsConfig) ToNode() *node.Node {
messages[k] = *text.NewInfoSelfServiceSettingsLookupSecret(code.Code)
formatted[k] = code.Code
} else {
messages[k] = *text.NewInfoSelfServiceSettingsLookupSecretUsed(time.Time(code.UsedAt))
messages[k] = *text.NewInfoSelfServiceSettingsLookupSecretUsed(time.Time(code.UsedAt).UTC())
formatted[k] = "used"
}
}
Expand Down
296 changes: 148 additions & 148 deletions selfservice/strategy/lookup/fixtures/settings/lookup_shown.json
Original file line number Diff line number Diff line change
@@ -1,153 +1,153 @@
[
{
"type": "input",
"group": "default",
"attributes": {
"name": "csrf_token",
"type": "hidden",
"value": "ZGY4cThmajNwNzJzMGVzN3ozbHBubHB5MWJrZDRzZmo=",
"required": true,
"disabled": false
},
"messages": [],
"meta": {}
},
{
"type": "text",
"group": "lookup_secret",
"attributes": {
"text": {
"id": 1050015,
"text": "key-0, used, key-2, key-3, used, key-5, key-6, used, key-8, key-9, used, key-11",
"type": "info",
"context": {
"secrets": [
{
"id": 1050009,
"text": "key-0",
"type": "info",
"context": {
"secret": "key-0"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 13:32:39 +0200 CEST",
"type": "info",
"context": {
"used_at": "2021-08-17T13:32:39+02:00"
}
},
{
"id": 1050009,
"text": "key-2",
"type": "info",
"context": {
"secret": "key-2"
}
},
{
"id": 1050009,
"text": "key-3",
"type": "info",
"context": {
"secret": "key-3"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 13:32:42 +0200 CEST",
"type": "info",
"context": {
"used_at": "2021-08-17T13:32:42+02:00"
}
},
{
"id": 1050009,
"text": "key-5",
"type": "info",
"context": {
"secret": "key-5"
}
},
{
"id": 1050009,
"text": "key-6",
"type": "info",
"context": {
"secret": "key-6"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 13:32:45 +0200 CEST",
"type": "info",
"context": {
"used_at": "2021-08-17T13:32:45+02:00"
}
},
{
"id": 1050009,
"text": "key-8",
"type": "info",
"context": {
"secret": "key-8"
}
},
{
"id": 1050009,
"text": "key-9",
"type": "info",
"context": {
"secret": "key-9"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 13:32:48 +0200 CEST",
"type": "info",
"context": {
"used_at": "2021-08-17T13:32:48+02:00"
}
},
{
"id": 1050009,
"text": "key-11",
"type": "info",
"context": {
"secret": "key-11"
}
}
]
{
"type": "input",
"group": "default",
"attributes": {
"name": "csrf_token",
"type": "hidden",
"value": "NWo1OXhqZDk0aDNnaW9yNjExcTUweHA3bWkzd21zdjI=",
"required": true,
"disabled": false
},
"messages": [],
"meta": {}
},
{
"type": "text",
"group": "lookup_secret",
"attributes": {
"text": {
"id": 1050015,
"text": "key-0, used, key-2, key-3, used, key-5, key-6, used, key-8, key-9, used, key-11",
"type": "info",
"context": {
"secrets": [
{
"id": 1050009,
"text": "key-0",
"type": "info",
"context": {
"secret": "key-0"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 11:32:39 +0000 UTC",
"type": "info",
"context": {
"used_at": "2021-08-17T11:32:39Z"
}
},
{
"id": 1050009,
"text": "key-2",
"type": "info",
"context": {
"secret": "key-2"
}
},
{
"id": 1050009,
"text": "key-3",
"type": "info",
"context": {
"secret": "key-3"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 11:32:42 +0000 UTC",
"type": "info",
"context": {
"used_at": "2021-08-17T11:32:42Z"
}
},
{
"id": 1050009,
"text": "key-5",
"type": "info",
"context": {
"secret": "key-5"
}
},
{
"id": 1050009,
"text": "key-6",
"type": "info",
"context": {
"secret": "key-6"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 11:32:45 +0000 UTC",
"type": "info",
"context": {
"used_at": "2021-08-17T11:32:45Z"
}
},
{
"id": 1050009,
"text": "key-8",
"type": "info",
"context": {
"secret": "key-8"
}
},
{
"id": 1050009,
"text": "key-9",
"type": "info",
"context": {
"secret": "key-9"
}
},
{
"id": 1050014,
"text": "Secret was used at 2021-08-17 11:32:48 +0000 UTC",
"type": "info",
"context": {
"used_at": "2021-08-17T11:32:48Z"
}
},
{
"id": 1050009,
"text": "key-11",
"type": "info",
"context": {
"secret": "key-11"
}
}
},
"id": "lookup_secret_codes"
},
"messages": [],
"meta": {
"label": {
"id": 1050010,
"text": "These are your back up recovery codes. Please keep them in a safe place!",
"type": "info"
}
]
}
},
{
"type": "input",
"group": "lookup_secret",
"attributes": {
"name": "lookup_secret_regenerate",
"type": "submit",
"value": "true",
"disabled": false
},
"messages": [],
"meta": {
"label": {
"id": 1050008,
"text": "Generate new backup recovery codes",
"type": "info"
}
}
"id": "lookup_secret_codes"
},
"messages": [],
"meta": {
"label": {
"id": 1050010,
"text": "These are your back up recovery codes. Please keep them in a safe place!",
"type": "info"
}
}
},
{
"type": "input",
"group": "lookup_secret",
"attributes": {
"name": "lookup_secret_regenerate",
"type": "submit",
"value": "true",
"disabled": false
},
"messages": [],
"meta": {
"label": {
"id": 1050008,
"text": "Generate new backup recovery codes",
"type": "info"
}
]
}
}
]

0 comments on commit 53b8b2a

Please sign in to comment.