Skip to content

Commit

Permalink
Add schema_url to immutability test
Browse files Browse the repository at this point in the history
  • Loading branch information
dgetu committed May 25, 2021
1 parent 602600f commit 7a0c286
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion opentelemetry-sdk/tests/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def test_immutability(self):
attributes_copy = attributes.copy()
attributes_copy.update(default_attributes)

resource = resources.Resource.create(attributes)
resource = resources.Resource.create(attributes, "")
self.assertEqual(resource.attributes, attributes_copy)

resource.attributes["has_bugs"] = False
Expand All @@ -193,6 +193,11 @@ def test_immutability(self):
attributes["cost"] = 999.91
self.assertEqual(resource.attributes, attributes_copy)

with self.assertRaises(AttributeError):
resource.schema_url = "bug"

self.assertEqual(resource.schema_url, "")

def test_service_name_using_process_name(self):
resource = resources.Resource.create(
{resources.PROCESS_EXECUTABLE_NAME: "test"}
Expand Down

0 comments on commit 7a0c286

Please sign in to comment.