Skip to content

FEATURE: Implement Agent Update ACL Tokens Endpoint#596

Open
marietta-a wants to merge 9 commits intoG-Research:masterfrom
marietta-a:feat/agent-token-acl
Open

FEATURE: Implement Agent Update ACL Tokens Endpoint#596
marietta-a wants to merge 9 commits intoG-Research:masterfrom
marietta-a:feat/agent-token-acl

Conversation

@marietta-a
Copy link
Contributor

Description

Related Issues

Addresses Issue: #480

Additional Context

Checklist

Please make sure to check the following before submitting your pull request:

  • Did you read the contributing guidelines?
  • Did you update the docs?
  • Did you write any tests to validate this change?

@marietta-a marietta-a changed the title FEATURE: Implement Update ACL Tokens Endpoint FEATURE: Implement Agent Update ACL Tokens Endpoint Mar 7, 2026
[SkippableFact]
public async Task Agent_UpdateToken()
{
var cutOffVersion = SemanticVersion.Parse("1.4.0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be 1.14.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhhh... from the logs, 1.15.0 perhaps?

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marietta-a ,

thanks for raising the PR. Generally it looks good, I would just want to improve the test. We can use [SkippableTheory] to parameterize the test. You can have a list of pairs (token_type , expected_result), so you can test positive and negative examples.

Consul.Agent
Consul.Agent.LogStream
Consul.Agent.LogStream.Dispose() -> void
Consul.Agent.UpdateToken(Consul.AgentToken token, string target) -> System.Threading.Tasks.Task<Consul.WriteResult>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is called token_type in consul (https://developer.hashicorp.com/consul/commands/acl/set-agent-token#usage)

Suggested change
Consul.Agent.UpdateToken(Consul.AgentToken token, string target) -> System.Threading.Tasks.Task<Consul.WriteResult>
Consul.Agent.UpdateToken(Consul.AgentToken token, string token_type) -> System.Threading.Tasks.Task<Consul.WriteResult>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions @marcin-krystianc, I have updated the test to use [SkippableTheory]

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants