File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22
3- - name : Add VSCode apt signing key if not present
4- apt_key :
5- id : BC528686B50D79E339D3721CEB3E94ADBE1229CF
6- url : https://packages.microsoft.com/keys/microsoft.asc
7- state : present
8-
9- - name : Add Microsoft's VSCode repository into sources list
10- apt_repository :
11- repo : deb [arch=amd64] https://packages.microsoft.com/repos/code stable main
12- state : present
13-
14- - name : Install VSCode
3+ - name : Install VSCode version 1.57.1 from .deb package
154 apt :
16- name : code
5+ deb : https://update. code.visualstudio.com/1.57.1/linux-deb-x64/stable
176 state : present
187
198- name : List VSCode Extensions
Original file line number Diff line number Diff line change 11import pytest
22
3- def test_vscode_apt_sources_list_exists_ (host ):
4- assert host .file ('/etc/apt/sources.list.d/packages_microsoft_com_repos_code.list' ).exists
5-
6- def test_vscode_apt_key_defined_ (host ):
7- assert 'Microsoft (Release signing) <gpgsecurity@microsoft.com>' in host .run ('apt-key list' ).stdout
8-
93def test_vscode_command_is_found_ (host ):
104 assert host .run ('which code' ).rc is 0
115
12- def test_vscode_version_command_succeeds_ (host ):
13- assert host .run ('code --version' ).rc is 0
6+ def test_vscode_version_command_reports_version_1_57_1_ (host ):
7+ assert '1.57.1' in host .run ('code --version' ).stdout
148
159@pytest .mark .parametrize ('extension' , [
1610 'zbr.vscode-ansible'
You can’t perform that action at this time.
0 commit comments