Skip to content

Commit

Permalink
chore: re-generate test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Dec 14, 2023
1 parent c23c516 commit 8a5330c
Show file tree
Hide file tree
Showing 71 changed files with 134 additions and 140 deletions.
2 changes: 1 addition & 1 deletion tests_generated/test_default_parameters/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "npm run deploy:ci"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ describe('hello world contract', () => {
test('simulate says hello with correct budget consumed', async () => {
const { algod, indexer, testAccount } = localnet.context
const { client } = await deploy(testAccount, algod, indexer)
const atc = await client.compose().hello({ name: 'World' }).hello({ name: 'Jane' }).atc()

const result = await atc.simulate(algod)
const result = await client.compose().hello({ name: 'World' }).hello({ name: 'Jane' }).simulate()

expect(result.methodResults[0].returnValue).toBe('Hello, World')
expect(result.methodResults[1].returnValue).toBe('Hello, Jane')
expect(result.simulateResponse.txnGroups[0].appBudgetConsumed).toBe(98)
expect(result.simulateResponse.txnGroups[0].appBudgetConsumed).toBeLessThan(100)
})
})
2 changes: 1 addition & 1 deletion tests_generated/test_ide_jetbrains-False/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_ide_jetbrains-True/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_ide_vscode-False/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_ide_vscode-True/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_preset_name-production/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_preset_name-starter/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_python_linter-flake8/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_python_linter-none/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
2 changes: 1 addition & 1 deletion tests_generated/test_python_linter-ruff/.algokit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_says_hello(hello_world_client: HelloWorldClient) -> None:
def test_simulate_says_hello_with_correct_budget_consumed(
hello_world_client: HelloWorldClient, algod_client: AlgodClient
) -> None:
atc = hello_world_client.compose().hello(name="World").hello(name="Jane").atc

result = atc.simulate(algod_client)
result = (
hello_world_client.compose().hello(name="World").hello(name="Jane").simulate()
)

assert result.abi_results[0].return_value == "Hello, World"
assert result.abi_results[1].return_value == "Hello, Jane"
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] == 98
assert result.simulate_response["txn-groups"][0]["app-budget-consumed"] < 100
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[algokit]
min_version = "v1.7.3"
min_version = "v1.8.0"

[deploy]
command = "poetry run python -m smart_contracts deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def build(output_dir: Path, app: beaker.Application) -> Path:
if result.returncode:
if "No such command" in result.stdout:
raise Exception(
"Could not generate typed client, requires AlgoKit 1.1 or "
"Could not generate typed client, requires AlgoKit 1.8.0 or "
"later. Please update AlgoKit"
)
else:
Expand Down
Loading

0 comments on commit 8a5330c

Please sign in to comment.