Skip to content

Commit

Permalink
Update security context mock in test
Browse files Browse the repository at this point in the history
Signed-off-by: noahjax <[email protected]>
  • Loading branch information
noahjax committed Mar 27, 2024
1 parent bce172e commit 81f8753
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ func getTaskContext(t *testing.T) *pluginCoreMocks.TaskExecutionContext {
tMeta.OnGetAnnotations().Return(map[string]string{"foo": "bar"})
tMeta.OnGetK8sServiceAccount().Return("k8s-account")
tMeta.OnGetEnvironmentVariables().Return(map[string]string{"foo": "bar"})
tMeta.OnGetSecurityContext().Return(flyteIdlCore.SecurityContext{
RunAs: &flyteIdlCore.Identity{ExecutionIdentity: "execution-identity"},
})
resourceManager := &pluginCoreMocks.ResourceManager{}
resourceManager.OnAllocateResourceMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(pluginCore.AllocationStatusGranted, nil)
resourceManager.OnReleaseResourceMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil)
Expand Down

0 comments on commit 81f8753

Please sign in to comment.