Repository: jina-ai/jina
File: tests/unit/orchestrate/deployments/config/test_docker_compose_pod_config.py (Python)

Code before:
        if custom_gateway
        else f'jinaai/jina:{deployment_config.worker_services[0].version}-py38-standard'
    )
    assert gateway_config['entrypoint'] == ['jina']
    assert gateway_config['ports'] == [f'{args.port[0]}:{args.port[0]}']
    assert gateway_config['expose'] == [args.port[0]]
    args = gateway_config['command']
    assert args[0] == 'gateway'
    assert '--port' in args
    assert args[args.index('--port') + 1] == '32465'
    assert '--env' not in args
    if deployments_addresses is not None:
        assert '--deployments-addresses' in args
        assert args[args.index('--deployments-addresses') + 1] == json.dumps(
            deployments_addresses
        )


@pytest.mark.parametrize('shards', [3, 1])
@pytest.mark.parametrize('replicas', [3, 1])
@pytest.mark.parametrize(
    'uses',
    [
        'jinahub+docker://HubExecutor',
        'docker://docker_image:latest',
        'jinaai+docker://jina-ai/HubExecutor',
    ],
)
@pytest.mark.parametrize(
    'uses_before',
    [
        None,
        'jinahub+docker://HubBeforeExecutor',
        'jinaai+docker://jina-ai/HubBeforeExecutor',
    ],
)
@pytest.mark.parametrize(
    'uses_after',
    [
        None,
        'jinahub+docker://HubAfterExecutor',
        'jinaai+docker://jina-ai/HubAfterExecutor',
    ],
)
@pytest.mark.parametrize('uses_with', ['{"paramkey": "paramvalue"}', None])
@pytest.mark.parametrize('uses_metas', ['{"workspace": "workspacevalue"}', None])
@pytest.mark.parametrize('polling', ['ANY', 'ALL'])
def test_docker_compose_yaml_regular_deployment(
    uses_before,
    uses_after,
    uses,

Review comment (suggestion):
```suggestion
        'docker://docker_image:latest',
        'jinaai+docker://jina-ai/HubExecutor',
```

Code after:
        else f'jinaai/jina:{deployment_config.worker_services[0].version}-py38-standard'
    )
    assert gateway_config['entrypoint'] == ['jina']
    assert gateway_config['ports'] == [f'{args.port[0]}:{args.port[0]}']
    assert gateway_config['expose'] == [args.port[0]]
    args = gateway_config['command']
    assert args[0] == 'gateway'
    assert '--port' in args
    assert args[args.index('--port') + 1] == '32465'
    assert '--env' not in args
    if deployments_addresses is not None:
        assert '--deployments-addresses' in args
        assert args[args.index('--deployments-addresses') + 1] == json.dumps(
            deployments_addresses
        )


@pytest.mark.parametrize('shards', [3, 1])
@pytest.mark.parametrize('replicas', [3, 1])
@pytest.mark.parametrize(
    'uses',
    [
        'docker://docker_image:latest',
        'jinaai+docker://jina-ai/HubExecutor',
    ],
)
@pytest.mark.parametrize(
    'uses_before',
    [
        None,
        'jinaai+docker://jina-ai/HubBeforeExecutor',
    ],
)
@pytest.mark.parametrize(
    'uses_after',
    [
        None,
        'jinaai+docker://jina-ai/HubAfterExecutor',
    ],
)
@pytest.mark.parametrize('uses_with', ['{"paramkey": "paramvalue"}', None])
@pytest.mark.parametrize('uses_metas', ['{"workspace": "workspacevalue"}', None])
@pytest.mark.parametrize('polling', ['ANY', 'ALL'])
def test_docker_compose_yaml_regular_deployment(
    uses_before,
    uses_after,
    uses,
    shards,
    replicas,
    uses_with,
    uses_metas,