diff options
Diffstat (limited to 'tests/run_tests.py')
| -rwxr-xr-x | tests/run_tests.py | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py new file mode 100755 index 0000000..4933017 --- /dev/null +++ b/tests/run_tests.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 + +import sys +import os +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from tests.test_namecheap_api import test_namecheap_api +from tests.test_cloudflare_api import test_cloudflare_api + +def run_all_tests(): + """Run all integration tests""" + print("๐งช REGFLOW INTEGRATION TEST SUITE") + print("="*60) + print("Testing API integrations with real endpoints") + print("(Non-mutating operations only)") + print("="*60) + + results = [] + + # Test Namecheap API + print("\n" + "="*60) + namecheap_success = test_namecheap_api() + results.append(("Namecheap API", namecheap_success)) + + # Test Cloudflare API + print("\n" + "="*60) + cloudflare_success = test_cloudflare_api() + results.append(("Cloudflare API", cloudflare_success)) + + # Summary + print("\n" + "="*60) + print("TEST RESULTS SUMMARY") + print("="*60) + + all_passed = True + for test_name, success in results: + status = "โ
PASSED" if success else "โ FAILED" + print(f"{test_name:20} {status}") + if not success: + all_passed = False + + print("="*60) + if all_passed: + print("๐ ALL TESTS PASSED! API integrations are working correctly.") + print("\nYour API credentials are valid and the system is ready for use.") + print("\nNext steps:") + print(" - Use --dry-run for safe testing") + print(" - Use --setup-only for existing domains") + print(" - Run without flags for live domain registration") + else: + print("โ SOME TESTS FAILED! Please check your API credentials and network connection.") + print("\nTroubleshooting:") + print(" - Verify API tokens are correct and complete") + print(" - Check that APIs are enabled for your accounts") + print(" - Ensure network connectivity to API endpoints") + + return all_passed + +if __name__ == "__main__": + success = run_all_tests() + sys.exit(0 if success else 1)
\ No newline at end of file |
