Repository navigation
OpenMage test harness, SOAP connect fix, checkout docs - #2
Merged
Merged
Conversation
dev/openmage stands up OpenMage LTS 20.18.0 (PHP 8.3 + Apache, MariaDB 10.11) and seeds a test-only API user, a simple product, a customer with an address, flat rate shipping, check/money order payment and a "noemail" store view. bootstrap.sh is resumable and never reinstalls an existing install; --reset wipes it. tests/integration runs the client against it over XML-RPC: core info, product/customer/order lists, and registered and guest checkouts through cart.order. It also pins down the server behaviour behind fulfilio#28 (unknown cart_customer.set mode), fulfilio#29 (shipping method must be the rate code) and fulfilio#32 (new-order email is controlled by store config, not by cart.order). The tests carry the "openmage" marker and are skipped unless OPENMAGE_URL is set, so the default run stays offline.
The SOAP v1 WSDL that Magento has shipped since 1.4.2 (and OpenMage still serves) restricts soapenc:Array but has the import of the SOAP encoding schema commented out, so suds raised TypeNotFound '(Array, http://schemas.xmlsoap.org/soap/encoding/)' while reading it and protocol='soap' could not connect at all. Re-add the import with a suds ImportDoctor. suds resolves it from its bundled copy, so nothing is fetched over the network, and the doctor does nothing when a WSDL already has the import. Covered by an offline test that serves an OpenMage-style WSDL, and by a live SOAP login + core_magento.info test. A second live test, marked xfail, records that suds still cannot encode list/dict call arguments.
Verified against OpenMage: cart_customer.set needs a valid mode, cart_shipping.method needs a rate code from cart_shipping.list, and cart.order always sends the order email unless the store view has order emails turned off. None is a library bug. SOAP v1 calls with arguments fail inside suds, so the README now says to use XML-RPC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the unreleased 4.0.0.
What changes
dev/openmage/: a minimal Docker OpenMage LTS 20.18 (PHP 8.3 + MariaDB, bound to 127.0.0.1:18080) with a bootstrap script that seeds an API user, a product, a customer, flat-rate shipping, check/money-order payment and anoemailstore view. Re-running it doesn't reinstall.tests/integration/: opt-in live tests markedopenmage, skipped unlessOPENMAGE_URLis set, so CI stays offline.protocol='soap'failed to connect to Magento 1.4.2+ and OpenMage (TypeNotFound: Array) because their WSDL doesn't import the SOAP encoding schema. The client now adds that import itself; suds resolves it from its bundled copy. Offline regression test included.cart_customer.setmodes (could not set customer data in CartCustomer fulfilio/python-magento#28), shipping rate codes (Fault 1062: 'Shipping method is not available' fulfilio/python-magento#29), placing orders without the order email (Disable email sending for new orders fulfilio/python-magento#32), and that SOAP only works for calls without arguments.Verification
uv run pytest -q: 41 passed, 19 skipped (integration tests).OPENMAGE_URL=http://localhost:18080/ uv run pytest -q -m openmage: 18 passed, 1 xfailed (the known SOAP argument limitation).