Skip to content

Commit

Permalink
added test for linode_type and account_transfer (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
vshanthe authored Jan 4, 2024
1 parent 64d2f2a commit 76dcce8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/integration/account/test_account_transfer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import os
import subprocess
from typing import List

env = os.environ.copy()
env["COLUMNS"] = "200"


def exec_test_command(args: List[str]):
process = subprocess.run(
args,
stdout=subprocess.PIPE,
env=env,
)
return process


def test_account_transfer():
process = exec_test_command(["linode-cli", "account", "transfer"])
output = process.stdout.decode()
assert "billable" in output
assert "quota" in output
assert "used" in output
26 changes: 26 additions & 0 deletions tests/integration/linodes/test_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os
import subprocess
from typing import List

env = os.environ.copy()
env["COLUMNS"] = "200"


def exec_test_command(args: List[str]):
process = subprocess.run(
args,
stdout=subprocess.PIPE,
env=env,
)
return process


# verifying the DC pricing changes along with types
def test_linode_type():
process = exec_test_command(["linode-cli", "linodes", "types"])
output = process.stdout.decode()
assert " price.hourly " in output
assert " price.monthly " in output
assert " region_prices " in output
assert " hourly " in output
assert " monthly " in output

0 comments on commit 76dcce8

Please sign in to comment.