Skip to content

[#787] Create tempdir in Cleveland if datadir is unspecified

Description

Problem: In cleveland, we are currently defaulting to the user's default tezos-client data directory (i.e. when --cleveland-data-dir isn't specified). In almost all circumstances, this is undesirable: it creates dependency on the environment, can mess up user's data directory, and overall seems like the wrong thing to do.

Solution: If --cleveland-data-dir is unspecified, create a temp. directory and pass it to tezos-client as a datadir. Additional consideration required with setupMoneybagAddress. Have to read secret_keys file to import secret key by alias.

Related issue(s)

Resolves #787 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Nikolay Yakimov

Merge request reports