Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Fox <[email protected]>
  • Loading branch information
kfox1111 committed Jan 10, 2024
1 parent d215134 commit 870a21a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/sidecar/sidecar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ func TestDefaultAgentAddress(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, spiffeSidecar.config.AgentAddress, "/tmp/spire-agent/public/api.sock")
}

func TestExitOnWaitFlag(t *testing.T) {
log, _ := test.NewNullLogger()
spiffeSidecar, err := New("../../test/sidecar/config/helper.conf", true, log)
require.NoError(t, err)
assert.Equal(t, spiffeSidecar.config.ExitWhenReady, true)
}

func TestEnvAgentAddress(t *testing.T) {
os.Setenv("SPIRE_AGENT_ADDRESS", "/tmp/spire-agent/public/api.sock")
log, _ := test.NewNullLogger()
Expand Down

0 comments on commit 870a21a

Please sign in to comment.