Skip to content

Commit bb310dd

Browse files
blakerousemergify[bot]
authored andcommitted
Add unprivileged to agent provider. (#4658)
(cherry picked from commit 2b7806b)
1 parent 6567a08 commit bb310dd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

internal/pkg/composable/providers/agent/agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func (*contextProvider) Run(ctx context.Context, comm corecomp.ContextProviderCo
3636
"build_time": release.BuildTime().Format("2006-01-02 15:04:05 -0700 MST"),
3737
"snapshot": release.Snapshot(),
3838
},
39+
"unprivileged": a.Unprivileged(),
3940
})
4041
if err != nil {
4142
return errors.New(err, "failed to set mapping", errors.TypeUnexpected)

internal/pkg/composable/providers/agent/agent_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ func TestContextProvider(t *testing.T) {
3535
assert.True(t, hasID, "missing id")
3636
_, hasVersion := current["version"]
3737
assert.True(t, hasVersion, "missing version")
38+
_, hasUnprivileged := current["unprivileged"]
39+
assert.True(t, hasUnprivileged, "missing unprivileged")
3840
}

0 commit comments

Comments
 (0)