Skip to content

Commit

Permalink
final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
teej committed Dec 18, 2024
1 parent 7522a5f commit 74d7518
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions tests/test_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,7 @@ def test_blueprint_vars_in_owner(session_ctx):
resources=[res.Schema(name="schema", owner="role_{{ var.role_name }}", database="STATIC_DATABASE")],
vars={"role_name": "role123"},
)
manifest = blueprint.generate_manifest(session_ctx)
# assert manifest.resources[1].data["owner"] == "role_{{ var.role_name }}"
assert blueprint.generate_manifest(session_ctx)


def test_blueprint_allowlist(session_ctx, remote_state):
Expand Down
4 changes: 0 additions & 4 deletions titan/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _coerce_resource_field(field_value, field_type):
return VarString(field_value)
elif isinstance(field_value, (Resource, VarString, str)):
return convert_role_ref(field_value)
# return field_value
else:
raise TypeError

Check warning on line 97 in titan/resources/resource.py

View check run for this annotation

Codecov / codecov/patch

titan/resources/resource.py#L97

Added line #L97 was not covered by tests

Expand Down Expand Up @@ -180,9 +179,6 @@ def to_dict(self, account_edition: AccountEdition):

def _serialize_field(field, value):
if field.name == "owner":
# if isinstance(value, str):
# return value
# else:
return str(value.fqn)
elif isinstance(value, ResourcePointer):
return str(value.fqn)
Expand Down

0 comments on commit 74d7518

Please sign in to comment.