-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major test overhaul for runtimes and podman
- Loading branch information
Showing
23 changed files
with
1,109 additions
and
221 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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package runtimes | ||
|
||
import "github.com/astronomer/astro-cli/pkg/fileutil" | ||
|
||
// FileChecker interface defines a method to check if a file exists. | ||
// This is here mostly for testing purposes. This allows us to mock | ||
// around actually checking for binaries on a live system as that | ||
// would create inconsistencies across developer machines when | ||
// working with the unit tests. | ||
type FileChecker interface { | ||
Exists(path string) bool | ||
} | ||
|
||
// DefaultOSFileChecker is a concrete implementation of FileChecker. | ||
type DefaultOSFileChecker struct{} | ||
|
||
// Exists checks if the file exists in the file system. | ||
func (f DefaultOSFileChecker) Exists(path string) bool { | ||
exists, _ := fileutil.Exists(path, nil) | ||
return exists | ||
} |
Oops, something went wrong.