tests: set DataDirectory_option as well as DataDirectory.

options_validate_cb() derives DataDirectory (which we use) from
DataDirectory_option (which the user sets).  I want to add a test
that will call options_validate_cb(), but it will fail unless it
derives the same value.
This commit is contained in:
Nick Mathewson 2019-10-24 20:16:44 -04:00
parent 4d53bbeafb
commit 06475f30e9

View File

@ -326,6 +326,7 @@ main(int c, const char **v)
initialize_mainloop_events();
options_init(options);
options->DataDirectory = tor_strdup(temp_dir);
options->DataDirectory_option = tor_strdup(temp_dir);
tor_asprintf(&options->KeyDirectory, "%s"PATH_SEPARATOR"keys",
options->DataDirectory);
options->CacheDirectory = tor_strdup(temp_dir);