-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from haodeon/feat/0.7.0
Update terraform to 1.6.6
- Loading branch information
Showing
12 changed files
with
84 additions
and
16 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "libterraform" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
description = "Python binding for Terraform." | ||
authors = ["Prodesire <[email protected]>"] | ||
license = "MIT" | ||
|
Submodule terraform
updated
1778 files
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,9 +1,34 @@ | ||
import os.path | ||
|
||
from libterraform import TerraformCommand | ||
from tests.consts import TF_SLEEP2_DIR | ||
|
||
|
||
class TestTerraformCommandTest: | ||
def test_test(self, cli: TerraformCommand): | ||
r = cli.test() | ||
assert r.retcode == 0, r.error | ||
assert 'The "terraform test" command is experimental' in r.value | ||
assert 'No tests defined' in r.error | ||
assert "Success! 0 passed, 0 failed." in r.value | ||
assert "".__eq__(r.error) | ||
|
||
def test_test_run(self): | ||
cwd = TF_SLEEP2_DIR | ||
tf = os.path.join(cwd, ".terraform") | ||
|
||
cli = TerraformCommand(cwd) | ||
if not os.path.exists(tf): | ||
cli.init() | ||
r = cli.test() | ||
assert r.retcode == 0, r.error | ||
assert "Success! 1 passed, 0 failed." in r.value | ||
|
||
def test_test_assertion_error(self): | ||
cwd = TF_SLEEP2_DIR | ||
tf = os.path.join(cwd, ".terraform") | ||
|
||
cli = TerraformCommand(cwd) | ||
if not os.path.exists(tf): | ||
cli.init() | ||
r = cli.test(vars={"sleep2_time1": "2s"}) | ||
assert r.retcode == 1 | ||
assert "libterraform test success!" in r.error |
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,17 @@ | ||
variables { | ||
sleep2_time2 = "2s" | ||
} | ||
|
||
run "valid_sleep_duration" { | ||
|
||
assert { | ||
condition = time_sleep.sleep2_wait1.create_duration == "1s" | ||
error_message = "libterraform test success!" | ||
} | ||
|
||
assert { | ||
condition = time_sleep.sleep2_wait2.create_duration == "2s" | ||
error_message = "Duration did not match expected" | ||
} | ||
|
||
} |