Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(workflow-recipes): use safe fixture values for snippet secret ownership tests

Jose Ramirez063e87f9a6f0
diff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.json
index 936aed870..77c5b2954 100644
--- a/workflow-recipes/package-lock.json
+++ b/workflow-recipes/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.472",
+ "version": "0.1.473",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workload-recipes-controller",
- "version": "0.1.472",
+ "version": "0.1.473",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@aws-sdk/client-s3": "^3.1009.0",
diff --git a/workflow-recipes/package.json b/workflow-recipes/package.json
index 808c03d9f..0f54149d9 100644
--- a/workflow-recipes/package.json
+++ b/workflow-recipes/package.json
@@ -1,6 +1,6 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.472",
+ "version": "0.1.473",
"description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface",
"main": "dist/main.js",
"engines": {
diff --git a/workflow-recipes/src/workflow/workflowReconciler.test.ts b/workflow-recipes/src/workflow/workflowReconciler.test.ts
index a84d26b07..936a735a1 100644
--- a/workflow-recipes/src/workflow/workflowReconciler.test.ts
+++ b/workflow-recipes/src/workflow/workflowReconciler.test.ts
@@ -843,7 +843,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
it('creates the snippet runner when the Secret is owned by the parent scope recipe', async () => {
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: { 'clerum.io/owner-recipe': parentScopeRecipeName } },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -871,7 +871,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
it('fails before pod creation when the Secret is owned by another recipe, naming the parent scope', async () => {
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: { 'clerum.io/owner-recipe': 'other-recipe' } },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -887,7 +887,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
it('fails before pod creation when the Secret is owned by the run-scoped child name', async () => {
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: { 'clerum.io/owner-recipe': childRecipeName } },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -908,7 +908,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
'clerum.io/shared': 'true',
},
},
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -924,7 +924,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
it('fails closed when the Secret carries no ownership label', async () => {
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: {} },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -940,7 +940,7 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
it('keeps shared=true Secrets accessible to the triggered run', async () => {
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: { 'clerum.io/shared': 'true' } },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild()
@@ -955,13 +955,13 @@ describe('WorkflowReconciler.reconcileDelete — orphaned Service cleanup', () =
// resource id resolves to the PARENT's instance Secret, owned by the parent.
mockCoreApi.readNamespacedSecret.mockResolvedValueOnce({
metadata: { labels: { 'clerum.io/owner-recipe': parentScopeRecipeName } },
- data: { token: 'cmVkYWN0ZWQ=' },
+ data: { token: 'fixture-token' },
})
const result = await reconcileTriggeredChild(
{
...snippetSecretSpec('gh-auth'),
- resources: [{ id: 'gh-auth', type: 'secret' as const, data: { token: 'redacted' } }],
+ resources: [{ id: 'gh-auth', type: 'secret' as const, data: { token: 'fixture-token' } }],
},
{ resourceInstances: { 'gh-auth': 'pr-review-gh-auth-d07f008b65ec' } }
)