Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receptorctl tests refactor #445

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

thenets
Copy link
Member

@thenets thenets commented Oct 15, 2021

  1. The original code:
  • Move fixture to conftest.py
  • Move original tests to test_connection.py

  1. Code quality improvement:
  • Complete new fixtures structure
  • Create test files with the test_ prefix
  • Use subprocess.check_output() instead of os.system(). This force a raise exception when the rc is not 0
  • Allow selecting the receptor binary from different places
  • Test CLI with click library

Tests executed locally with make receptorctl-tests:

image

@thenets thenets force-pushed the major-receptorctl-tests-refactor branch from 996e88c to 89d2931 Compare October 18, 2021 06:30
@thenets thenets changed the title WIP receptorctl tests refactor Receptorctl tests refactor Oct 18, 2021
@shanemcd
Copy link
Member

Please see my feedback from #447

Makefile Outdated Show resolved Hide resolved
WIP receptorctl tests refactor

Clean up useless test content

Update Makefile receptorctl-tests command

Added hack to cli.py to allow pytest code

Remove hack from cli.py

Convert invoke commands to fixtures

WIP test_work_verify_signature

WIP add context

Remove test_mesh.py file

Fix all click lib problems with pytest

Minor sintax fix on Makefile
@thenets thenets force-pushed the major-receptorctl-tests-refactor branch from 89d2931 to f787cfd Compare October 20, 2021 08:23
@thenets
Copy link
Member Author

thenets commented Oct 20, 2021

@shanemcd problem solved. I fixed the problem invoking the command in a different way.

@shanemcd shanemcd merged commit 49ee7e1 into ansible:devel Oct 20, 2021
@thenets thenets deleted the major-receptorctl-tests-refactor branch October 20, 2021 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants