Skip to content

Commit 76dcce8

Browse files
authored
added test for linode_type and account_transfer (#564)
1 parent 64d2f2a commit 76dcce8

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
import subprocess
3+
from typing import List
4+
5+
env = os.environ.copy()
6+
env["COLUMNS"] = "200"
7+
8+
9+
def exec_test_command(args: List[str]):
10+
process = subprocess.run(
11+
args,
12+
stdout=subprocess.PIPE,
13+
env=env,
14+
)
15+
return process
16+
17+
18+
def test_account_transfer():
19+
process = exec_test_command(["linode-cli", "account", "transfer"])
20+
output = process.stdout.decode()
21+
assert "billable" in output
22+
assert "quota" in output
23+
assert "used" in output
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import os
2+
import subprocess
3+
from typing import List
4+
5+
env = os.environ.copy()
6+
env["COLUMNS"] = "200"
7+
8+
9+
def exec_test_command(args: List[str]):
10+
process = subprocess.run(
11+
args,
12+
stdout=subprocess.PIPE,
13+
env=env,
14+
)
15+
return process
16+
17+
18+
# verifying the DC pricing changes along with types
19+
def test_linode_type():
20+
process = exec_test_command(["linode-cli", "linodes", "types"])
21+
output = process.stdout.decode()
22+
assert " price.hourly " in output
23+
assert " price.monthly " in output
24+
assert " region_prices " in output
25+
assert " hourly " in output
26+
assert " monthly " in output

0 commit comments

Comments
 (0)