Skip to content

Commit 0ce72ea

Browse files
Matovidloclaude
andcommitted
test(e2e): add push-force-with-orphaned-scheduler fixture
Exercises the --force-specific warning path: when the user passes --force with an orphaned scheduler in the manifest, the warning now explicitly says the orphaned configs will be deleted from remote if they exist there, rather than the generic "may delete" phrasing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 786c7d0 commit 0ce72ea

16 files changed

Lines changed: 136 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
push --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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"branches": [
3+
{
4+
"branch": {
5+
"name": "Main",
6+
"description": "",
7+
"isDefault": true
8+
},
9+
"configs": []
10+
}
11+
]
12+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest loaded with warnings (some records were skipped):
2+
- %s
3+
Orphaned records are excluded from the push. With --force, these configs will be deleted from remote if they still exist there. Run `kbc pull --force` to reset local state first.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Plan for "push" operation:
2+
no difference

test/cli/push/push-force-with-orphaned-scheduler/in/.gitkeep

Whitespace-only changes.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
}

test/cli/push/push-force-with-orphaned-scheduler/in/description.md

Whitespace-only changes.

test/cli/push/push-force-with-orphaned-scheduler/in/main/description.md

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Main",
3+
"isDefault": true
4+
}

0 commit comments

Comments
 (0)