-
Notifications
You must be signed in to change notification settings - Fork 139
Re-wire auth to use a provider pattern. Lots of tests remove cloud references #3230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
eeffceb
c7bdcc4
418d37a
a77aae7
71e149b
0b38551
f0c4708
9a2bb37
4fd8740
c1762ab
8376b0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ import { getEventClassification } from './get-event-classification'; | |
| import { simplifyAttributes } from './simplify-attributes'; | ||
|
|
||
| export async function getEventAttributes( | ||
| { historyEvent, namespace, settings, accessToken }: EventWithMetadata, | ||
| { historyEvent, namespace, settings }: EventWithMetadata, | ||
| { | ||
| convertWithCodec = convertPayloadToJsonWithCodec, | ||
| decodeAttributes = decodePayloadAttributes, | ||
|
|
@@ -38,7 +38,6 @@ export async function getEventAttributes( | |
| attributes, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| }); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| const decodedAttributes = decodeAttributes(convertedAttributes) as object; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ import { get } from 'svelte/store'; | |
|
|
||
| import { page } from '$app/stores'; | ||
|
|
||
| import { authUser } from '$lib/stores/auth-user'; | ||
| import type { | ||
| PendingActivity, | ||
| PendingActivityWithMetadata, | ||
|
|
@@ -16,7 +15,7 @@ import { | |
| } from '$lib/utilities/decode-payload'; | ||
|
|
||
| export async function getActivityAttributes( | ||
| { activity, namespace, settings, accessToken }: PendingActivityWithMetadata, | ||
| { activity, namespace, settings }: PendingActivityWithMetadata, | ||
| { | ||
| convertWithCodec = convertPayloadToJsonWithCodec, | ||
| decodeAttributes = decodePayloadAttributes, | ||
|
|
@@ -26,7 +25,6 @@ export async function getActivityAttributes( | |
| attributes: activity, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| }); | ||
|
|
||
| const decodedAttributes = decodeAttributes( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
@@ -39,13 +37,11 @@ const decodePendingActivity = async ({ | |
| activity, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| }: PendingActivityWithMetadata): Promise<PendingActivity> => { | ||
| const decodedActivity = await getActivityAttributes({ | ||
| activity, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| }); | ||
| return decodedActivity; | ||
| }; | ||
|
|
@@ -54,7 +50,6 @@ export const toDecodedPendingActivities = async ( | |
| workflow: WorkflowExecution, | ||
| namespace: string = get(page).params.namespace, | ||
| settings: Settings = get(page).data.settings, | ||
| accessToken: string = get(authUser).accessToken, | ||
| ) => { | ||
| const pendingActivities = workflow?.pendingActivities ?? []; | ||
| const decodedActivities: PendingActivity[] = []; | ||
|
|
@@ -63,7 +58,6 @@ export const toDecodedPendingActivities = async ( | |
| activity, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| }); | ||
| decodedActivities.push(decodedActivity); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ import pendingActivityWorkflow from '$fixtures/workflow.pending-activities.json' | |
|
|
||
| const namespace = 'unit-tests'; | ||
| const settings = settingsFixture as unknown as Settings; | ||
| const accessToken = 'access-token'; | ||
|
|
||
| describe('toDecodedPendingActivities', () => { | ||
| it('should decode heartbeatDetails', async () => { | ||
|
|
@@ -19,7 +18,6 @@ describe('toDecodedPendingActivities', () => { | |
| workflow, | ||
| namespace, | ||
| settings, | ||
| accessToken, | ||
| ); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| expect(decodedHeartbeatDetails[0].heartbeatDetails.payloads[0]).toBe(2); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.