Skip to content

Commit 7773cea

Browse files
Matovidloclaude
andcommitted
test(e2e): add pull+rename E2E test with orphaned scheduler
Regression test for PSGO-233: verifies that kbc pull --force succeeds when the manifest contains an orphaned scheduler (fake ID, no local files, not in remote) AND a config exists at a wrong path that needs to be renamed. Previously PathsGenerator.doUpdate could panic on stateless objects encountered during the rename plan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d154382 commit 7773cea

20 files changed

Lines changed: 168 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pull --force --storage-api-token %%TEST_KBC_STORAGE_API_TOKEN%%
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest loaded with warnings (some records were skipped):
2+
- %s
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Ignoring invalid local state.
2+
Plan for "pull" operation:
3+
* B main | changed: description
4+
* C main/extractor/ex-generic-v2/wrong-name | changed: description, name
5+
Plan for "rename" operation:
6+
- main/extractor/ex-generic-v2/{wrong-name -> empty}
7+
Rename done.
8+
Pull done.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"version": 2,
3+
"project": {
4+
"id": %%TEST_KBC_PROJECT_ID%%,
5+
"apiHost": "%%TEST_KBC_STORAGE_API_HOST%%"
6+
},
7+
"allowTargetEnv": false,
8+
"sortBy": "path",
9+
"naming": {
10+
"branch": "{branch_name}",
11+
"config": "{component_type}/{component_id}/{config_name}",
12+
"configRow": "rows/{config_row_name}",
13+
"schedulerConfig": "schedules/{config_name}",
14+
"sharedCodeConfig": "_shared/{target_component_id}",
15+
"sharedCodeConfigRow": "codes/{config_row_name}",
16+
"variablesConfig": "variables",
17+
"variablesValuesRow": "values/{config_row_name}",
18+
"dataAppConfig": "app/{component_id}/{config_name}"
19+
},
20+
"allowedBranches": [
21+
"__all__"
22+
],
23+
"ignoredComponents": [],
24+
"templates": {
25+
"repositories": [
26+
{
27+
"type": "git",
28+
"name": "keboola",
29+
"url": "https://github.com/keboola/keboola-as-code-templates.git",
30+
"ref": "main"
31+
}
32+
]
33+
},
34+
"branches": [
35+
{
36+
"id": %%TEST_BRANCH_MAIN_ID%%,
37+
"path": "main"
38+
}
39+
],
40+
"configurations": [
41+
{
42+
"branchId": %%TEST_BRANCH_MAIN_ID%%,
43+
"componentId": "keboola.scheduler",
44+
"id": "456",
45+
"path": "schedules/schedule1",
46+
"relations": [
47+
{
48+
"componentId": "ex-generic-v2",
49+
"configId": "123",
50+
"type": "schedulerFor"
51+
}
52+
],
53+
"rows": []
54+
},
55+
{
56+
"branchId": %%TEST_BRANCH_MAIN_ID%%,
57+
"componentId": "ex-generic-v2",
58+
"id": "%%TEST_BRANCH_ALL_CONFIG_EMPTY_ID%%",
59+
"path": "extractor/ex-generic-v2/wrong-name",
60+
"rows": []
61+
}
62+
]
63+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "wrong-name"
3+
}

0 commit comments

Comments
 (0)