Skip to content

Commit eb6e21e

Browse files
authored
chore: reduce e2e feature coverage to improve resiliency (#2443)
- remove diagnostic testing with ansible-lint missing - remove diagnostic testing with validation disabled If needed these tests should be implemented as unit.
1 parent d50892b commit eb6e21e

File tree

2 files changed

+2
-68
lines changed

2 files changed

+2
-68
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ jobs:
336336
if: contains(matrix.name, 'test') && steps.ready_to_test.outputs.ready_to_test == 'true'
337337
run: task mcp:test ${{ matrix.env.TASKFILE_ARGS }} && task mcp:test ${{ matrix.env.TASKFILE_ARGS }} --status
338338

339-
- name: task e2e
339+
- name: task e2e (vscode-test)
340340
# https://github.com/ansible/vscode-ansible/issues/1451
341341
if: ${{ !cancelled() && contains(matrix.name, 'test') && steps.ready_to_test.outputs.ready_to_test == 'true' }}
342342
run: |
@@ -346,7 +346,7 @@ jobs:
346346
# || { task flush && task e2e ${{ matrix.env.TASKFILE_ARGS }}; }
347347
# task e2e ${{ matrix.env.TASKFILE_ARGS }} --status
348348

349-
- name: task ui
349+
- name: task ui (extest)
350350
# https://github.com/ansible/vscode-ansible/issues/1451
351351
if: ${{ !cancelled() && contains(matrix.name, 'test') && !contains(matrix.name, 'wsl') && steps.ready_to_test.outputs.ready_to_test == 'true'}}
352352
run: |

test/e2e/diagnostics/ansibleWithoutEE.test.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -76,70 +76,4 @@ describe("ansible-diag-no-ee", function () {
7676
]);
7777
});
7878
});
79-
80-
describe("Diagnostic test with ansible-syntax-check", function () {
81-
before(async function () {
82-
await updateSettings("validation.lint.enabled", false);
83-
await vscode.commands.executeCommand("workbench.action.closeAllEditors");
84-
// Give language server time to process document close and settings change
85-
await new Promise((resolve) => setTimeout(resolve, 2500));
86-
clearActivationCache(); // Clear cache after editors closed
87-
});
88-
89-
after(async function () {
90-
await updateSettings("validation.lint.enabled", true); // Revert back the setting to default
91-
await vscode.commands.executeCommand("workbench.action.closeAllEditors");
92-
clearActivationCache(); // Clear cache after editors closed
93-
});
94-
95-
it("should return no diagnostics", async function () {
96-
await activate(docUri1);
97-
await vscode.commands.executeCommand("workbench.action.files.save");
98-
await waitForDiagnosisCompletion(); // Wait for the diagnostics to compute on this file
99-
100-
await testDiagnostics(docUri1, []);
101-
});
102-
103-
it("should complain about invalid `hosts` key", async function () {
104-
await activate(docUri2);
105-
await vscode.commands.executeCommand("workbench.action.files.save");
106-
await waitForDiagnosisCompletion(); // Wait for the diagnostics to compute on this file
107-
108-
await testDiagnostics(docUri2, [
109-
{
110-
severity: 0,
111-
message: "Error processing keyword 'hosts': 'my_hosts' is undefined",
112-
range: new vscode.Range(
113-
new vscode.Position(0, 0),
114-
new vscode.Position(0, integer.MAX_VALUE),
115-
),
116-
source: "Ansible",
117-
},
118-
]);
119-
});
120-
});
121-
122-
describe("no diagnostics", function () {
123-
before(async function () {
124-
await updateSettings("validation.enabled", false);
125-
await vscode.commands.executeCommand("workbench.action.closeAllEditors");
126-
// Give language server time to process document close and settings change
127-
await new Promise((resolve) => setTimeout(resolve, 500));
128-
clearActivationCache(); // Clear cache after editors closed
129-
});
130-
131-
after(async function () {
132-
await updateSettings("validation.enabled", true); // Revert back the setting to default
133-
await vscode.commands.executeCommand("workbench.action.closeAllEditors");
134-
clearActivationCache(); // Clear cache after editors closed
135-
});
136-
137-
it("should return no diagnostics even when `hosts` key is missing", async function () {
138-
await activate(docUri2);
139-
await vscode.commands.executeCommand("workbench.action.files.save");
140-
await waitForDiagnosisCompletion(); // Wait for the diagnostics to compute on this file
141-
142-
await testDiagnostics(docUri2, []);
143-
});
144-
});
14579
});

0 commit comments

Comments
 (0)