kytos-ng / kytos-end-to-end-tests

Kytos End-to-End Tests
0 stars 10 forks source link

[fix] test_125_patch_dynamic_backup_path for mef_eline PR 233 #194

Closed viniarck closed 1 year ago

viniarck commented 1 year ago

Summary

Local tests

I've tested it locally with mef_eline PR 233 (link mentioned above)

+ python3 -m pytest --timeout=600 tests/ -k test_125_patch_dynamic_backup_path
============================= test session starts ==============================
platform linux -- Python 3.9.2, pytest-7.2.0, pluggy-1.0.0
rootdir: /tests
plugins: rerunfailures-10.2, timeout-2.1.0
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 199 items / 198 deselected / 1 selected

tests/test_e2e_10_mef_eline.py .                                         [100%]

=============================== warnings summary ===============================
usr/local/lib/python3.9/dist-packages/kytos/core/config.py:186
  /usr/local/lib/python3.9/dist-packages/kytos/core/config.py:186: UserWarning: Unknown arguments: ['--timeout=600', 'tests/', '-k', 'test_125_patch_dynamic_backup_path']
    warnings.warn(f"Unknown arguments: {unknown}")

test_e2e_10_mef_eline.py: 17 warnings
  /usr/lib/python3/dist-packages/mininet/node.py:1121: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    return ( StrictVersion( cls.OVSVersion ) <

test_e2e_10_mef_eline.py: 17 warnings
  /usr/lib/python3/dist-packages/mininet/node.py:1122: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    StrictVersion( '1.10' ) )

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
------------------------------- start/stop times -------------------------------
========== 1 passed, 198 deselected, 35 warnings in 78.09s (0:01:18) ===========
+ tail -f
viniarck commented 1 year ago

Excellent to have this fix and the updated e2e test! Thank you, @viniarck. It looks good to me.

I've just one suggestion: can you please create a new e2e test that sends the PATCH request with a payload containing only dynamic_backup_path equals False and then assert on the 4xx status code? WDYT?

Thanks for reviewing, @italovalcy. Sure, let's add it, done on https://github.com/amlight/kytos-end-to-end-tests/pull/194/commits/dac5fd1cd87a0daf829393702b3659811cc8249f

+ python3 -m pytest --timeout=600 tests/ -k test_126_patch_dynamic_backup_path_false_no_primary_path
============================= test session starts ==============================
platform linux -- Python 3.9.2, pytest-7.2.0, pluggy-1.0.0
rootdir: /tests
plugins: rerunfailures-10.2, timeout-2.1.0
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 200 items / 199 deselected / 1 selected

tests/test_e2e_10_mef_eline.py .                                         [100%]
========== 1 passed, 199 deselected, 35 warnings in 68.46s (0:01:08) ===========