Skip to content

feat: test lab function support #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 14, 2023
Merged

feat: test lab function support #59

merged 4 commits into from
Apr 14, 2023

Conversation

Salakar
Copy link
Member

@Salakar Salakar commented Apr 10, 2023

Live tested with the following fn:

from firebase_functions.test_lab_fn import (
    CloudEvent,
    TestMatrixCompletedData,
    on_test_matrix_completed,
)


@on_test_matrix_completed()
def testmatrixcompleted(event: CloudEvent[TestMatrixCompletedData]) -> None:
    """Test Matrix Completed Event Handler."""
    print(f"Test Matrix ID: {event.data.test_matrix_id}")
    print(f"Test Matrix State: {event.data.state}")
    print(f"Test Matrix Outcome Summary: {event.data.outcome_summary}")

    print("Result Storage:")
    print(
        f"  Tool Results History: {event.data.result_storage.tool_results_history}"
    )
    print(f"  Results URI: {event.data.result_storage.results_uri}")
    print(f"  GCS Path: {event.data.result_storage.gcs_path}")
    print(
        f"  Tool Results Execution: {event.data.result_storage.tool_results_execution}"
    )

    print("Client Info:")
    print(f"  Client: {event.data.client_info.client}")
    print(f"  Details: {event.data.client_info.details}")

Function deploys successfully:

image

Function executes successfully via test lab:

image

image

@Salakar Salakar marked this pull request as ready for review April 12, 2023 10:30
Copy link
Collaborator

@taeold taeold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@taeold taeold merged commit 734a693 into firebase:main Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants