Skip to content
Snippets Groups Projects
Commit 6669ca0a authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

upgrade-reference: also update the benchrepo with the roles

We are introduce new important configuration data, we should make sure the
upgrade makes it available.
parent d2b101ba
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
# Find the benchrepo file
topdir_file = os.listdir(tmp_directory)
assert len(topdir_file) == 2
assert len(topdir_file) == 2, topdir_file
benchrepo = [x for x in topdir_file if x.endswith(".benchrepo")]
assert len(benchrepo) == 1
......@@ -108,6 +108,12 @@
# some old version of the file has the partial_sets at the wrong level
new_benchrepo["reference-repo"].pop("partial_sets", None)
# add/update the role definition in reference file
#
# note: same comment about "optional partial-sets argument apply
if 'roles' in partial_config:
new_benchrepo["roles"] = partial_config["roles"]
# And write it
with open(benchrepo_path, "w") as new_benchrepo_file:
new_benchrepo_file.write(
......
......@@ -120,6 +120,12 @@
id: my-source-repo
repo-prefix: my-source-repo-39241d24
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
$ ls some-dir > first-run
......@@ -250,3 +256,9 @@
id: my-source-repo
repo-prefix: my-source-repo-1a2b3c4d
source: some-dir/my-source-repo
roles:
pull:
noop:
same:
source: reference
target: same
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment