for_all_repos: adapt test
The `this` repo is skipped in the test for the `for-all-repos` command. Adapt to checking for KAS_REPO_URL being empty instead of comparing the KAS_REPO_NAME. This way the test will fail if the implementation diverges from the documentation: > KAS_REPO_URL: The URL from which this repository was cloned, or an > empty string if no remote URL was given in the config file. Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
a40127f8ed
commit
358e5924c4
@ -32,7 +32,7 @@ def test_for_all_repos(changedir, tmpdir):
|
|||||||
shutil.copytree('tests/test_commands', tdir)
|
shutil.copytree('tests/test_commands', tdir)
|
||||||
os.chdir(tdir)
|
os.chdir(tdir)
|
||||||
kas.kas(['for-all-repos', 'test.yml',
|
kas.kas(['for-all-repos', 'test.yml',
|
||||||
'''if [ "${KAS_REPO_NAME}" != "this" ]; then git rev-parse HEAD \
|
'''if [ -n "${KAS_REPO_URL}" ]; then git rev-parse HEAD \
|
||||||
>> %s/ref_${KAS_REPO_NAME}; fi''' % (tdir)])
|
>> %s/ref_${KAS_REPO_NAME}; fi''' % (tdir)])
|
||||||
|
|
||||||
with open('ref_kas_1.0', 'r') as f:
|
with open('ref_kas_1.0', 'r') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user