Skip to content

Commit 558567f

Browse files
committed
chore: fix tests
1 parent 6f64372 commit 558567f

File tree

8 files changed

+141
-154
lines changed

8 files changed

+141
-154
lines changed

unicorn_contracts/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#### Global Variables
2-
stackName := $(shell yq -oy '.default.global.parameters.stack_name' samconfig.yaml)
3-
2+
stackName := $(shell yq -ot '.default.global.parameters.stack_name' samconfig.toml)
43

54
#### Test Variables
65
apiUrl = $(call cf_output,$(stackName),ApiUrl)

unicorn_contracts/poetry.lock

Lines changed: 133 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unicorn_contracts/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ python = "^3.11"
1010
boto3 = "^1.35.14"
1111
aws-lambda-powertools = {extras = ["tracer"], version = "^2.43.1"}
1212
aws-xray-sdk = "^2.14.0"
13+
tomli = "^2.0.0"
1314

1415
[tool.poetry.group.dev.dependencies]
1516
pytest = "^8.3.2"

unicorn_contracts/tests/integration/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from typing import Iterator
44

55
import json
6+
import tomli
67
from pathlib import Path
78

89
import boto3
910
from arnparse import arnparse
10-
from yaml import load, Loader
1111

1212

1313
#### CONSTANTS
14-
DEFAULT_SAM_CONFIG_FILE = Path(__file__).parent.parent.parent.resolve() / 'samconfig.yaml'
14+
DEFAULT_SAM_CONFIG_FILE = Path(__file__).parent.parent.parent.resolve() / 'samconfig.toml'
1515
STACK_OUTPUTS = dict()
1616
EVENTS_DIR = Path(__file__).parent / 'events'
1717

@@ -23,8 +23,8 @@
2323

2424

2525
def get_stack_name(samconfig: Path | str = DEFAULT_SAM_CONFIG_FILE) -> str:
26-
with open(samconfig, 'r') as f:
27-
conf = load(f, Loader=Loader)
26+
with open(samconfig, 'rb') as f:
27+
conf = tomli.load(f)
2828
stack_name = conf['default']['global']['parameters']['stack_name']
2929

3030
return stack_name

unicorn_properties/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#### Global Variables
2-
stackName := $(shell yq -oy '.default.global.parameters.stack_name' samconfig.yaml)
2+
stackName := $(shell yq -ot '.default.global.parameters.stack_name' samconfig.toml)
33

44

55
#### Test Variables

unicorn_properties/tests/unit/test_content_integrity_validator_function.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

unicorn_properties/tests/unit/test_contract_exists_checker_function.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

unicorn_web/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#### Global Variables
2-
stackName := $(shell yq -oy '.default.global.parameters.stack_name' samconfig.yaml)
2+
stackName := $(shell yq -ot '.default.global.parameters.stack_name' samconfig.toml)
33

44

55
#### Test Variables

0 commit comments

Comments
 (0)