Skip to content

Commit e7e5cfa

Browse files
committed
fix: update integ tests pointing to old namespace field
1 parent 56516de commit e7e5cfa

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

e2e-tests/fixtures/import/setup_memory_full.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main():
3131
"semanticMemoryStrategy": {
3232
"name": "bugbash_semantic",
3333
"description": "Semantic strategy for bugbash testing",
34-
"namespaces": ["default"],
34+
"namespaceTemplates": ["default"],
3535
}
3636
},
3737
{
@@ -68,7 +68,7 @@ def main():
6868
print(f" eventExpiryDuration: 30")
6969
print(f" executionRoleArn: {role_arn}")
7070
print(" strategies:")
71-
print(" - type: SEMANTIC, name: bugbash_semantic, namespaces: [default]")
71+
print(" - type: SEMANTIC, name: bugbash_semantic, namespaceTemplates: [default]")
7272
print(" - type: SUMMARIZATION, name: bugbash_summary")
7373
print(" - type: USER_PREFERENCE, name: bugbash_userpref")
7474
print(" tags: {env: bugbash, team: agentcore-cli}")

integ-tests/add-remove-resources.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('integration: add and remove resources', () => {
4444
telemetry.assertMetricEmitted({ command: 'add.memory', exit_reason: 'success' });
4545
});
4646

47-
it('adds a memory with EPISODIC strategy and verifies reflectionNamespaces', async () => {
47+
it('adds a memory with EPISODIC strategy and verifies reflectionNamespaceTemplates', async () => {
4848
const episodicMemName = `EpiMem${Date.now().toString().slice(-6)}`;
4949
const result = await runCLI(
5050
['add', 'memory', '--name', episodicMemName, '--strategies', 'EPISODIC', '--json'],
@@ -56,19 +56,19 @@ describe('integration: add and remove resources', () => {
5656
const json = JSON.parse(result.stdout);
5757
expect(json.success).toBe(true);
5858

59-
// Verify EPISODIC in config with reflectionNamespaces
59+
// Verify EPISODIC in config with reflectionNamespaceTemplates
6060
const config = await readProjectConfig(project.projectPath);
6161
const memories = config.memories as {
6262
name: string;
63-
strategies: { type: string; reflectionNamespaces?: string[] }[];
63+
strategies: { type: string; reflectionNamespaceTemplates?: string[] }[];
6464
}[];
6565
const mem = memories.find(m => m.name === episodicMemName);
6666
expect(mem, 'Memory should exist').toBeTruthy();
6767

6868
const episodic = mem!.strategies.find(s => s.type === 'EPISODIC');
6969
expect(episodic, 'EPISODIC strategy should exist').toBeTruthy();
70-
expect(episodic!.reflectionNamespaces, 'Should have reflectionNamespaces').toBeDefined();
71-
expect(episodic!.reflectionNamespaces!.length).toBeGreaterThan(0);
70+
expect(episodic!.reflectionNamespaceTemplates, 'Should have reflectionNamespaceTemplates').toBeDefined();
71+
expect(episodic!.reflectionNamespaceTemplates!.length).toBeGreaterThan(0);
7272

7373
telemetry.assertMetricEmitted({
7474
command: 'add.memory',

integ-tests/create-memory.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe.skipIf(!prereqs.npm || !prereqs.git)('integration: create with memory o
8080

8181
// longAndShortTerm should have strategies defined
8282
const memory = memories![0]!;
83-
const strategies = memory.strategies as { type: string; reflectionNamespaces?: string[] }[] | undefined;
83+
const strategies = memory.strategies as { type: string; reflectionNamespaceTemplates?: string[] }[] | undefined;
8484
expect(strategies, 'memory should have strategies').toBeDefined();
8585
expect(strategies!.length).toBe(4);
8686

@@ -91,10 +91,10 @@ describe.skipIf(!prereqs.npm || !prereqs.git)('integration: create with memory o
9191
expect(types).toContain('SUMMARIZATION');
9292
expect(types).toContain('EPISODIC');
9393

94-
// Verify EPISODIC has reflectionNamespaces
94+
// Verify EPISODIC has reflectionNamespaceTemplates
9595
const episodic = strategies!.find(s => s.type === 'EPISODIC');
9696
expect(episodic, 'EPISODIC strategy should exist').toBeTruthy();
97-
expect(episodic!.reflectionNamespaces, 'EPISODIC should have reflectionNamespaces').toBeDefined();
98-
expect(episodic!.reflectionNamespaces!.length).toBeGreaterThan(0);
97+
expect(episodic!.reflectionNamespaceTemplates, 'EPISODIC should have reflectionNamespaceTemplates').toBeDefined();
98+
expect(episodic!.reflectionNamespaceTemplates!.length).toBeGreaterThan(0);
9999
});
100100
});

integ-tests/tui/add-memory-episodic.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
*
44
* Drives the "Add Memory" wizard through the TUI to verify that when a user
55
* selects the EPISODIC strategy, it is correctly persisted in agentcore.json
6-
* with both namespaces and reflectionNamespaces.
6+
* with both namespaceTemplates and reflectionNamespaceTemplates.
77
*
88
* Exercises:
99
* - Navigation from HelpScreen -> Add Resource -> Memory
1010
* - Memory name input
1111
* - Expiry selection (default 30 days)
1212
* - Strategy multi-select including EPISODIC
1313
* - Confirm review screen
14-
* - Verification that agentcore.json contains EPISODIC with reflectionNamespaces
14+
* - Verification that agentcore.json contains EPISODIC with reflectionNamespaceTemplates
1515
*/
1616
import { TuiSession, WaitForTimeoutError } from '../../src/tui-harness/index.js';
1717
import { createMinimalProjectDir } from './helpers.js';
@@ -176,14 +176,14 @@ describe('Add Memory with EPISODIC Strategy', () => {
176176
expect(found).toBe(true);
177177
});
178178

179-
it('Step 9: agentcore.json contains EPISODIC with reflectionNamespaces', async () => {
179+
it('Step 9: agentcore.json contains EPISODIC with reflectionNamespaceTemplates', async () => {
180180
const configPath = join(projectDir.dir, 'agentcore', 'agentcore.json');
181181
const raw = await readFileAsync(configPath, 'utf-8');
182182
const config = JSON.parse(raw);
183183

184184
const memories = config.memories as {
185185
name: string;
186-
strategies: { type: string; namespaces?: string[]; reflectionNamespaces?: string[] }[];
186+
strategies: { type: string; namespaceTemplates?: string[]; reflectionNamespaceTemplates?: string[] }[];
187187
}[];
188188
expect(memories.length).toBeGreaterThan(0);
189189

@@ -197,12 +197,12 @@ describe('Add Memory with EPISODIC Strategy', () => {
197197
expect(types).toContain('USER_PREFERENCE');
198198
expect(types).toContain('EPISODIC');
199199

200-
// Verify EPISODIC has namespaces AND reflectionNamespaces
200+
// Verify EPISODIC has namespaceTemplates AND reflectionNamespaceTemplates
201201
const episodic = memory!.strategies.find(s => s.type === 'EPISODIC');
202202
expect(episodic, 'EPISODIC strategy should exist').toBeTruthy();
203-
expect(episodic!.namespaces, 'EPISODIC should have namespaces').toBeDefined();
204-
expect(episodic!.namespaces!.length).toBeGreaterThan(0);
205-
expect(episodic!.reflectionNamespaces, 'EPISODIC should have reflectionNamespaces').toBeDefined();
206-
expect(episodic!.reflectionNamespaces!.length).toBeGreaterThan(0);
203+
expect(episodic!.namespaceTemplates, 'EPISODIC should have namespaceTemplates').toBeDefined();
204+
expect(episodic!.namespaceTemplates!.length).toBeGreaterThan(0);
205+
expect(episodic!.reflectionNamespaceTemplates, 'EPISODIC should have reflectionNamespaceTemplates').toBeDefined();
206+
expect(episodic!.reflectionNamespaceTemplates!.length).toBeGreaterThan(0);
207207
});
208208
});

0 commit comments

Comments
 (0)