-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[2.1] [backport] Adding --omit-env-files Back porting #1000 to 2.1 branch. Adding --omit-env-files option Adding an option to not write out files into the env folder as these can contain sensitive information. Changing write fifo to take either bytes or a string. Initially based off of #812 Reviewed-by: Shane McDonald me@shanemcd.com Reviewed-by: John Westcott IV Reviewed-by: David Shrewsbury Reviewed-by: Shane McDonald <me@shanemcd.com>
- Loading branch information
1 parent
d25d930
commit e5a8b36
Showing
7 changed files
with
132 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from ansible_runner.utils import open_fifo_write | ||
from os import remove | ||
|
||
|
||
def test_fifo_write_bytes(tmp_path): | ||
path = tmp_path / "bytes_test" | ||
data = "bytes" | ||
try: | ||
open_fifo_write(path, data.encode()) | ||
with open(path, 'r') as f: | ||
results = f.read() | ||
assert results == data | ||
finally: | ||
remove(path) | ||
|
||
|
||
def test_fifo_write_string(tmp_path): | ||
path = tmp_path / "string_test" | ||
data = "string" | ||
try: | ||
open_fifo_write(path, data) | ||
with open(path, 'r') as f: | ||
results = f.read() | ||
assert results == data | ||
finally: | ||
remove(path) |