Add a unit test to verify that it is not possible for
an image to be hex after encoding, and a tag "latest" will
be appended if the image does not have a valid tag.
Closes: #1181
Approved by: giuseppe
A 'high-level' unit test is added that covers basic functionality
check for refactored function '_handle_system_package_files'.
Closes: #1155
Approved by: giuseppe
This commit refactors the writing info part from 'do_checkout'
into a function.
Also, because of the above action, two of the local variables
'installed_files_template' and 'rename_files' are also removed
Other than those, an extra error case was added to the except list.
A unit test is added for future regression
Closes: #1155
Approved by: giuseppe
This commit refactors the "rename file value substitution" code
section in '_do_checkout' function
There should not be any functional impact with this commit
A unit test is added for future regression
Closes: #1155
Approved by: giuseppe
This commit contains small refactoring of getting manifest
attributes and refactoring of the "tempfile cleaning during
upgrade" code section in '_do_checkout'
Also, 'has_container_service' local variable is genereated in the
function instead of being passed in as a parameter. This is done
because in the future refactoring we might want to elminate the
usage of local variables related to manifest completly.
A unit test is added to verify getting manifest attribute works
as expected
Closes: #1155
Approved by: giuseppe
This commit contains refactoring for write config in '_do_checkout' function,
this refactoring also removes the duplication of writing config in 'run_once'
There should not be functional impact with this commit.
A unit test is added for future regression
Closes: #1160
Approved by: giuseppe
In _do_checkout, we refactor the part for getting rootfs location
into a function.
A todo comment( refactoring 'missing image layer check') is also added
in this commit based on discussions on irc
A unit test is added for future regression
Closes: #1154
Approved by: giuseppe
This is regression from https://github.com/projectatomic/atomic/pull/1152.
It appears that 'self' is no longer used when '_resolve_remote_path' is moved into
'_get_remote_location'. Thus, '_get_remote_location' is made to be static
Closes: #1154
Approved by: giuseppe
Made a new class to track all the refactored functions' unit tests
(for future usage)
Added a unit test to test the functionality of the factored out
_get_remote_location function.
Closes: #1152
Approved by: giuseppe