This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When we introduced the ability to specify podman executable, we inadvertently changed the behavior of the loading mechanism (commit e120aa1). Before that change, it was possible to initialize the podman driver even if the podman executable was not present. In other words, it was OK to install the podman driver without having podman installed on the system. With the new mechanism in place, Molecule will fail to start when the podman driver is installed and there is no podman executable available on the system. This commit restores the od lazy-loading behavior.
- Loading branch information
Showing
3 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
"""Unit tests.""" | ||
from molecule import api | ||
|
||
from molecule_podman.driver import Podman | ||
|
||
|
||
def test_driver_is_detected(): | ||
"""Asserts that molecule recognizes the driver.""" | ||
assert any(str(d) == "podman" for d in api.drivers()) | ||
|
||
|
||
def test_driver_initializes_without_podman_executable(monkeypatch): | ||
"""Make sure we can initiaize driver without having an executable present.""" | ||
monkeypatch.setenv("MOLECULE_PODMAN_EXECUTABLE", "bad-executable") | ||
Podman() |