Skip to content

Commit

Permalink
test function rename
Browse files Browse the repository at this point in the history
Summary: as requested by IanChilds

Reviewed By: rajneesh

Differential Revision: D63701564

fbshipit-source-id: 76dc746e2030685759d05e2430e512ade41bd9d7
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Oct 9, 2024
1 parent c2d7671 commit 043d371
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/e2e/test/test_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async def test_discovery_cached(buck: Buck) -> None:
"buck2.cache_test_listings=true",
"//:ok",
]
await check_discovery_is_not_executed(buck, False, args)
await check_discovery_is_not_executed(
await run_test_and_check_discovery_presence(buck, False, args)
await run_test_and_check_discovery_presence(
buck, False, args
) # will be true once the implementation is done

Expand All @@ -31,20 +31,20 @@ async def test_discovery_cache_turned_off(buck: Buck) -> None:
args = [
"//:ok",
]
await check_discovery_is_not_executed(buck, False, args)
await check_discovery_is_not_executed(buck, False, args)
await run_test_and_check_discovery_presence(buck, False, args)
await run_test_and_check_discovery_presence(buck, False, args)


async def check_discovery_is_not_executed(
async def run_test_and_check_discovery_presence(
buck: Buck,
cached: bool,
is_present: bool,
args: List[str],
) -> None:
await buck.test(*args)
stdout = (await buck.log("what-ran")).stdout

assert "test.run" in stdout
if cached:
if is_present:
assert "test.discovery" not in stdout
else:
assert "test.discovery" in stdout

0 comments on commit 043d371

Please sign in to comment.