Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/azure-cli-testsdk/azure/cli/testsdk/preparers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def live_only_execute(self, cli_ctx, command, expect_failure=False):

return None

@property
def random_name(self):
# override random_name so that in play-back mode the name is deterministic.
# non-deterministic preparers have no recording of requests involved in creating the resource
return self.moniker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only supposed to apply to playback mode, then should it not be something like:

if self.is_live:
  return random_thing
else:
  return self.moniker

?



# Resource Group Preparer and its shorthand decorator

Expand Down
Loading