Skip to content

Commit

Permalink
Add unprivileged to agent provider. (#4658)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse authored May 2, 2024
1 parent 213c09e commit 2b7806b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/pkg/composable/providers/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (*contextProvider) Run(ctx context.Context, comm corecomp.ContextProviderCo
"build_time": release.BuildTime().Format("2006-01-02 15:04:05 -0700 MST"),
"snapshot": release.Snapshot(),
},
"unprivileged": a.Unprivileged(),
})
if err != nil {
return errors.New(err, "failed to set mapping", errors.TypeUnexpected)
Expand Down
2 changes: 2 additions & 0 deletions internal/pkg/composable/providers/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ func TestContextProvider(t *testing.T) {
assert.True(t, hasID, "missing id")
_, hasVersion := current["version"]
assert.True(t, hasVersion, "missing version")
_, hasUnprivileged := current["unprivileged"]
assert.True(t, hasUnprivileged, "missing unprivileged")
}

0 comments on commit 2b7806b

Please sign in to comment.