Skip to content

Commit 1dcec0e

Browse files
authored
access-token: update docs and tests for expired_at (#121)
Signed-off-by: Nick Santos <[email protected]>
1 parent c2d3c6f commit 1dcec0e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/data-sources/access_token.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ output "access_token_details" {
5858
- `created_at` (String) The creation time of the access token
5959
- `creator_ip` (String) The IP address of the creator of the access token
6060
- `creator_ua` (String) The user agent of the creator of the access token
61+
- `expires_at` (String) The expiration time of the access token
6162
- `generated_by` (String) The user who generated the access token
6263
- `is_active` (Boolean) Whether the access token is active
6364
- `last_used` (String) The last time the access token was used

internal/provider/resource_access_token_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestAccessTokenResource(t *testing.T) {
3636
resource.TestCheckResourceAttr("docker_access_token.test", "token_label", "test-label"),
3737
resource.TestCheckResourceAttr("docker_access_token.test", "scopes.#", "2"), // Assuming there are 2 scopes
3838
resource.TestCheckResourceAttrSet("docker_access_token.test", "token"), // Check if the token is set
39-
resource.TestCheckResourceAttr("docker_access_token.test_expires", "expires_at", "2025-12-31T23:59:59Z"),
39+
resource.TestCheckResourceAttr("docker_access_token.test", "expires_at", "2029-12-31T23:59:59Z"),
4040
),
4141
},
4242
{
@@ -59,6 +59,6 @@ const testAccessTokenResourceConfig = `
5959
resource "docker_access_token" "test" {
6060
token_label = "test-label"
6161
scopes = ["repo:read", "repo:write"]
62-
expires_at = "2025-12-31T23:59:59Z"
62+
expires_at = "2029-12-31T23:59:59Z"
6363
}
6464
`

0 commit comments

Comments
 (0)