On September 5, 2017 5:20:40 PM EDT, Ryan Harper <email address hidden> wrote: > > >Diff comments: > >> diff --git a/tests/unittests/test_ds_identify.py >b/tests/unittests/test_ds_identify.py >> index 1a81a89..c389029 100644 >> --- a/tests/unittests/test_ds_identify.py >> +++ b/tests/unittests/test_ds_identify.py >> @@ -48,6 +54,7 @@ P_SEED_DIR = "var/lib/cloud/seed" >> P_DSID_CFG = "etc/cloud/ds-identify.cfg" >> >> MOCK_VIRT_IS_KVM = {'name': 'detect_virt', 'RET': 'kvm', 'ret': 0} >> +MOCK_UNAME_IS_PPC64 = {'name': 'uname', 'out': UNAME_PPC64EL, 'ret': >0} > >why is there 'out' here vs. 'RET' in the other mock? >
Detect_virt is a function that sets the _RET variable. It has no stdout or stderr. Uname is actually a command that has its stdout and stderr mocked.
« Back to merge proposal
On September 5, 2017 5:20:40 PM EDT, Ryan Harper <email address hidden> wrote: unittests/ test_ds_ identify. py unittests/ test_ds_ identify. py unittests/ test_ds_ identify. py unittests/ test_ds_ identify. py cloud/seed" ds-identify. cfg" IS_PPC64 = {'name': 'uname', 'out': UNAME_PPC64EL, 'ret':
>
>
>Diff comments:
>
>> diff --git a/tests/
>b/tests/
>> index 1a81a89..c389029 100644
>> --- a/tests/
>> +++ b/tests/
>> @@ -48,6 +54,7 @@ P_SEED_DIR = "var/lib/
>> P_DSID_CFG = "etc/cloud/
>>
>> MOCK_VIRT_IS_KVM = {'name': 'detect_virt', 'RET': 'kvm', 'ret': 0}
>> +MOCK_UNAME_
>0}
>
>why is there 'out' here vs. 'RET' in the other mock?
>
Detect_virt is a function that sets the _RET variable. It has no stdout or stderr. Uname is actually a command that has its stdout and stderr mocked.