Commit cd2449fb authored by Piotr Batko's avatar Piotr Batko Committed by Bartek Wrona
Browse files

Way of copying artifacts is selected during copying, not during block log object creation

At the first version of block log implementation in TestTools, when block log object was
created, user had to decide how artifacts will be treated during copying.

Few commits ago there was added possibility, to override way of copying artifacts just in
time of copying (with `block_log.copy_to(destination, artifacts="always")`).

It turned out, that there is no need to specify it during block log creation in any use
case. Block log objects are used in following use cases:
1) to replay a node from given block log -- in this case node have to include artifacts if
   are provided (it's policy named "optional"),
2) to perform copy of block log generated by node under -- then users wants only block
   logs, without artifacts, and might be even suprised if artifacts would be copied
   together (it's policy named "exclude").

So in this commit:
- way of specifing how artifacts should be copied is disabled in BlockLog's initializer
- by default artifacts are not copied (by default are "excluded") to simplify use case #2
- in Node.run method, when block log is used for replaying node, artifacts are copied
  if provided, and it's ok, if are missing (it's policy named "optional") -- use case #1
parent 39e2cd65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment