@@ -155,3 +155,65 @@ def test_copy_using_ls(tmp_path: Path, output: Output) -> None:
155155 installer ._copy_repo_files (local_repo_path = source , destination_path = dest )
156156 moved = dest .glob ("**/*" )
157157 assert sorted ([m .name for m in list (moved )]) == ["file1.txt" , "file2.txt" ]
158+
159+
160+ def test_no_adt_install (
161+ tmpdir : Path ,
162+ output : Output ,
163+ ) -> None :
164+ """Test only core is installed.
165+
166+ Args:
167+ tmpdir: A temporary directory.
168+ output: The output fixture.
169+ """
170+ venv = tmpdir / "test_venv"
171+ args = Namespace (
172+ venv = venv ,
173+ verbose = 0 ,
174+ adt = False ,
175+ system_site_packages = False ,
176+ collection_specifier = None ,
177+ requirement = None ,
178+ cpi = None ,
179+ )
180+
181+ config = Config (args = args , output = output , term_features = output .term_features )
182+ config .init ()
183+
184+ installer = Installer (output = output , config = config )
185+ installer .run ()
186+ assert venv .exists ()
187+ assert (venv / "bin" / "ansible" ).exists ()
188+ assert not (venv / "bin" / "adt" ).exists ()
189+
190+
191+ def test_adt_install (
192+ tmpdir : Path ,
193+ output : Output ,
194+ ) -> None :
195+ """Test adt is installed.
196+
197+ Args:
198+ tmpdir: A temporary directory.
199+ output: The output fixture.
200+ """
201+ venv = tmpdir / "test_venv"
202+ args = Namespace (
203+ venv = venv ,
204+ verbose = 0 ,
205+ adt = True ,
206+ system_site_packages = False ,
207+ collection_specifier = None ,
208+ requirement = None ,
209+ cpi = None ,
210+ )
211+
212+ config = Config (args = args , output = output , term_features = output .term_features )
213+ config .init ()
214+
215+ installer = Installer (output = output , config = config )
216+ installer .run ()
217+ assert venv .exists ()
218+ assert (venv / "bin" / "ansible" ).exists ()
219+ assert (venv / "bin" / "adt" ).exists ()
0 commit comments