File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,30 @@ def test_salt_extensions_in_versions_report(tmp_path, salt_extension):
4747 assert salt_extension .name in versions_information ["Salt Extensions" ]
4848
4949
50+ def test_mysql_extensions_in_versions_report (tmp_path ):
51+ with SaltVirtualEnv (venv_dir = tmp_path / ".venv" ) as venv :
52+ # These are required for the test to pass, why are they not already
53+ # installed?
54+ venv .install ("pyyaml" )
55+ venv .install ("looseversion" )
56+ venv .install ("packaging" )
57+ # Install mysql extension into the virtualenv
58+ venv .install ("mysqlclient" )
59+ installed_packages = venv .get_installed_packages ()
60+ assert "mysqlclient" in installed_packages
61+ ret = venv .run_code (
62+ """
63+ import json
64+ import salt.version
65+
66+ print(json.dumps(salt.version.versions_information()))
67+ """
68+ )
69+ versions_information = json .loads (ret .stdout )
70+ assert "Dependency Versions" in versions_information
71+ assert versions_information .get ("Dependency Versions" ).get ("mysql-python" ) is not None
72+
73+
5074def test_salt_extensions_absent_in_versions_report (tmp_path , salt_extension ):
5175 """
5276 Ensure that the 'Salt Extensions' header does not show up when no extension is installed
You can’t perform that action at this time.
0 commit comments