Identity: Rename "namespace" to "type" in the requester interface (#90567)
This commit is contained in:
@@ -73,7 +73,7 @@ func TestStreamManager_SubmitStream_Send(t *testing.T) {
|
||||
}
|
||||
|
||||
mockContextGetter.EXPECT().GetPluginContext(context.Background(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, user identity.Requester, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, bool, error) {
|
||||
userID, err := identity.IntIdentifier(user.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(user.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, int64(2), userID)
|
||||
require.Equal(t, int64(1), user.GetOrgID())
|
||||
@@ -258,7 +258,7 @@ func TestStreamManager_SubmitStream_ErrorRestartsRunStream(t *testing.T) {
|
||||
}
|
||||
|
||||
mockContextGetter.EXPECT().GetPluginContext(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, user identity.Requester, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, bool, error) {
|
||||
userID, err := identity.IntIdentifier(user.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(user.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, int64(2), userID)
|
||||
require.Equal(t, int64(1), user.GetOrgID())
|
||||
@@ -343,7 +343,7 @@ func TestStreamManager_HandleDatasourceUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
mockContextGetter.EXPECT().GetPluginContext(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, user identity.Requester, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, bool, error) {
|
||||
userID, err := identity.IntIdentifier(user.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(user.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, int64(2), userID)
|
||||
@@ -412,7 +412,7 @@ func TestStreamManager_HandleDatasourceDelete(t *testing.T) {
|
||||
}
|
||||
|
||||
mockContextGetter.EXPECT().GetPluginContext(context.Background(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, user identity.Requester, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, bool, error) {
|
||||
userID, err := identity.IntIdentifier(user.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(user.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, int64(2), userID)
|
||||
require.Equal(t, int64(1), user.GetOrgID())
|
||||
|
||||
Reference in New Issue
Block a user