add proxy gateways with --px arg

Proxy gateways do not run workers, and are meant to be passed with the
`via` attribute to additional gateways.
They are useful for running multiple workers on remote machines.

Example usage:
```
pytest -sv --dist=load --px "id=my_proxy//socket=IP:PORT" --tx "5*popen//via=my_proxy"
```

Proxy gateways do not run workers, anda re meant to be passed
This commit is contained in:
Alon Livne
2025-01-11 17:02:13 +02:00
parent a82981f444
commit a9a303f688
7 changed files with 35 additions and 14 deletions

View File

@@ -295,7 +295,7 @@ class TestDistOptions:
def test_getxspecs(self, pytester: pytest.Pytester) -> None:
config = pytester.parseconfigure("--tx=popen", "--tx", "ssh=xyz")
nodemanager = NodeManager(config)
xspecs = nodemanager._getxspecs()
xspecs = nodemanager._gettxspecs()
assert len(xspecs) == 2
print(xspecs)
assert xspecs[0].popen
@@ -303,7 +303,7 @@ class TestDistOptions:
def test_xspecs_multiplied(self, pytester: pytest.Pytester) -> None:
config = pytester.parseconfigure("--tx=3*popen")
xspecs = NodeManager(config)._getxspecs()
xspecs = NodeManager(config)._gettxspecs()
assert len(xspecs) == 3
assert xspecs[1].popen