Skip to content

Commit

Permalink
ENH: Remove support for credentials environment variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Mar 18, 2022
1 parent 4a7f5a7 commit e485347
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 2 additions & 11 deletions tests/test_children.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class TestChildrenValidation(BaseTestCase):
"id": "some-id",
"backend": {
"name": "GCPPubSubBackend",
"project_name": "my-project",
"credentials_environment_variable": "GCP_SERVICE_ACCOUNT"
"project_name": "my-project"
}
}
]
Expand All @@ -88,13 +87,6 @@ def test_backend_cannot_be_empty(self):
with self.assertRaises(exceptions.InvalidValuesContents):
Twine().validate_children(source=single_child_missing_backend)

def test_backend_credentials_environment_variable_can_be_empty(self):
"""Test that the backend credentials environment variable of a child can be empty."""
children = (
"""[{"key": "gis", "id": "some-id", "backend": {"name": "GCPPubSubBackend", "project_name": "blah"}}]"""
)
Twine(source=self.VALID_TWINE_WITH_CHILDREN).validate_children(source=children)

def test_extra_key_validation_on_empty_twine(self):
"""Test that children with extra data will not raise a validation error on an empty twine."""
children_values_with_extra_data = """
Expand All @@ -118,8 +110,7 @@ def test_extra_key_validation_on_valid_twine(self):
"id": "some-id",
"backend": {
"name": "GCPPubSubBackend",
"project_name": "my-project",
"credentials_environment_variable": "GCP_SERVICE_ACCOUNT"
"project_name": "my-project"
},
"some_extra_property": "should not be a problem if present"
}
Expand Down
4 changes: 0 additions & 4 deletions twined/schema/children_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
"project_name": {
"description": "Name of the Google Cloud Platform (GCP) project the child exists in.",
"type": "string"
},
"credentials_environment_variable": {
"description": "Name of environment variable containing either the absolute path to a Google Cloud Platform credentials JSON file or the JSON itself as a string.",
"type": "string"
}
},
"required": ["name", "project_name"]
Expand Down

0 comments on commit e485347

Please sign in to comment.