Skip to content

Commit

Permalink
Merge branch 'main' into tamirkamara/fix-yq-with-json
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirkamara authored Apr 16, 2023
2 parents 322d188 + eab69a1 commit 504a591
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ bundle-publish:
&& porter publish --registry "${ACR_FQDN}" --force

bundle-register:
@# NOTE: ACR_NAME below comes from the env files, so needs the double '$$'. Others are set on command execution and don't
$(call target_title, "Registering ${DIR} bundle") \
&& . ${MAKEFILE_DIR}/devops/scripts/check_dependencies.sh porter,env \
&& az acr login --name ${ACR_NAME} \
Expand Down Expand Up @@ -289,7 +288,6 @@ bundle-publish-register-all:
${MAKEFILE_DIR}/devops/scripts/publish_and_register_all_bundles.sh

deploy-shared-service:
@# NOTE: ACR_NAME below comes from the env files, so needs the double '$$'. Others are set on command execution and don't
$(call target_title, "Deploying ${DIR} shared service") \
&& . ${MAKEFILE_DIR}/devops/scripts/check_dependencies.sh porter,env \
&& ${MAKEFILE_DIR}/devops/scripts/ensure_cli_signed_in.sh $${TRE_URL} \
Expand Down
19 changes: 8 additions & 11 deletions e2e_tests/test_workspace_services.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pytest

import config
from e2e_tests.conftest import get_workspace_owner_token, disable_and_delete_ws_resource
from helpers import check_aad_auth_redirect
from resources.resource import post_resource
from resources.resource import get_resource, post_resource
from resources import strings

pytestmark = pytest.mark.asyncio
Expand All @@ -21,10 +20,10 @@
@pytest.mark.extended
@pytest.mark.timeout(75 * 60)
async def test_create_guacamole_service_into_base_workspace(setup_test_workspace_and_guacamole_service, verify) -> None:
_, workspace_id, workspace_service_path, workspace_service_id = setup_test_workspace_and_guacamole_service
_, workspace_id, workspace_service_path, _ = setup_test_workspace_and_guacamole_service
workspace_owner_token = await get_workspace_owner_token(workspace_id, verify)

await ping_guacamole_workspace_service(workspace_id, workspace_service_id, verify)
await ping_guacamole_workspace_service(workspace_service_path, workspace_owner_token, verify)

user_resource_payload = {
"templateName": strings.GUACAMOLE_WINDOWS_USER_RESOURCE,
Expand Down Expand Up @@ -53,16 +52,14 @@ async def test_create_guacamole_service_into_aad_workspace(setup_test_aad_worksp
}
}

_, workspace_service_id = await post_resource(workspace_service_payload, f'/api{workspace_path}/{strings.API_WORKSPACE_SERVICES}', workspace_owner_token, verify)
workspace_service_path, _ = await post_resource(workspace_service_payload, f'/api{workspace_path}/{strings.API_WORKSPACE_SERVICES}', workspace_owner_token, verify)

await ping_guacamole_workspace_service(workspace_id, workspace_service_id, verify)
await ping_guacamole_workspace_service(workspace_service_path, workspace_owner_token, verify)


async def ping_guacamole_workspace_service(workspace_id, workspace_service_id, verify) -> None:
short_workspace_id = workspace_id[-4:]
short_workspace_service_id = workspace_service_id[-4:]
endpoint = f"https://guacamole-{config.TRE_ID}-ws-{short_workspace_id}-svc-{short_workspace_service_id}.azurewebsites.net/guacamole"

async def ping_guacamole_workspace_service(workspace_service_path, access_token, verify) -> None:
workspace_service = await get_resource(f"/api{workspace_service_path}", access_token, verify)
endpoint = workspace_service["workspaceService"]["properties"]["connection_uri"]
await check_aad_auth_redirect(endpoint, verify)


Expand Down

0 comments on commit 504a591

Please sign in to comment.