Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default socket path #82

Merged
merged 8 commits into from
Jul 17, 2023
Merged

Conversation

FedeNQ
Copy link
Contributor

@FedeNQ FedeNQ commented Jul 6, 2023

Change proposal:

  • AgentAddress set by defaultvalue if isn't set.
  • AgentAddress can be set by ENV variable.
  • Unit test for both cases.
  • Example and readme files updated to snakeCase.

Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
README.md Show resolved Hide resolved
assert.Equal(t, spiffeSidecar.config.AgentAddress, "/tmp/spire-agent/public/api.sock")
}
func TestEnvAgentAddress(t *testing.T) {
os.Setenv("SPIRE_AGENT_ADDRESS", "/tmp/agent.sock")
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add a test case where you have env var set, but file contains agent_address set? (so we can verify than by default we''ll use file)

Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
@MarcosDY MarcosDY merged commit a3f3ed3 into spiffe:main Jul 17, 2023
6 checks passed
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.

3 participants