Skip to content

Commit

Permalink
removing provides from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chb2mn committed Feb 13, 2024
1 parent 5f0a43f commit fc2abbb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions grr/server/grr_response_server/artifact_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ def testGetArtifacts(self, registry):
self.assertFalse(ar.GetArtifactPathDependencies(result))

# Check provides filtering
results = registry.GetArtifacts(
os_name="Windows", provides=["users.homedir", "domain"])
for result in results:
# provides contains at least one of the filter strings
self.assertGreaterEqual(
len(set(result.provides).union(set(["users.homedir", "domain"]))), 1)

results = registry.GetArtifacts(
os_name="Windows", provides=["nothingprovidesthis"])
Expand All @@ -105,16 +99,16 @@ def testGetArtifactNames(self, registry):
registry.AddFileSource(self.test_artifacts_file)

result_objs = registry.GetArtifacts(
os_name="Windows", provides=["users.homedir", "domain"])
os_name="Windows")

results_names = registry.GetArtifactNames(
os_name="Windows", provides=["users.homedir", "domain"])
os_name="Windows")

self.assertCountEqual(set([a.name for a in result_objs]), results_names)
self.assertNotEmpty(results_names)

results_names = registry.GetArtifactNames(
os_name="Darwin", provides=["users.username"])
os_name="Darwin")
self.assertIn("UsersDirectory", results_names)

@artifact_test_lib.PatchCleanArtifactRegistry
Expand Down

0 comments on commit fc2abbb

Please sign in to comment.