@@ -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