Skip to content

Add test coverage for high-level and low-level executor functions#14

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-tests-high-low-level-functions
Draft

Add test coverage for high-level and low-level executor functions#14
Copilot wants to merge 5 commits intomainfrom
copilot/add-tests-high-low-level-functions

Conversation

Copy link

Copilot AI commented Feb 16, 2026

The repository had no test coverage for the executor lambda functions. This adds comprehensive unit tests for both the high-level handle_event() orchestration and all six low-level executor functions.

Changes

  • High-level tests (4): handle_event() success/error paths, ARN parsing, exception propagation
  • Executor initialization (2): AWS Secrets Manager integration, error handling
  • Executor execution (2): Function routing validation, unrecognized function handling
  • Low-level executor functions (9): All six executor methods with success/error cases:
    • import_GOES_data_to_timestream()
    • create_GOES_data_annotations()
    • generate_cloc_report_and_upload()
    • import_UDL_REACH_to_timestream()
    • import_stix_to_timestream()
    • get_padre_orbit_data()
  • Lambda handler (2): Entry point proxy behavior

Test Structure

Tests use mocking to eliminate external dependencies:

@patch('executor.executor.util.record_timeseries')
@patch('stixdcpy.quicklook.LightCurves.from_sdc')
def test_import_stix_to_timestream_with_data(self, mock_lightcurves, mock_record):
    """Test STIX data import with data."""
    mock_lc = Mock()
    mock_lc.data = True
    mock_lc.time = Time(["2024-01-01T00:00:00", "2024-01-01T00:01:00"])
    mock_lc.counts = [[1.0, 2.0], [3.0, 4.0]]
    mock_lightcurves.return_value = mock_lc
    
    Executor.import_stix_to_timestream()
    
    mock_lightcurves.assert_called_once()
    mock_record.assert_called_once()

Total: 19 tests, 62% coverage

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • services.swpc.noaa.gov
    • Triggering command: /usr/bin/python python -m pytest tests/test_executor.py -v /tmp/pip-installHEAD et-metadata_23e8032c8bfd45e98bec7a5f7aaad13a/ ease (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/test_executor.py::TestExecutorExecute::test_execute_valid_function -v 9de0444/.git 2254e65b37a5d9a1-n al/local/bin/git1 --untracked-filegit (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 16, 2026 22:02
Co-authored-by: ehsteve <739053+ehsteve@users.noreply.github.com>
…on types

Co-authored-by: ehsteve <739053+ehsteve@users.noreply.github.com>
Co-authored-by: ehsteve <739053+ehsteve@users.noreply.github.com>
Co-authored-by: ehsteve <739053+ehsteve@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tests for high level and low level functions Add test coverage for high-level and low-level executor functions Feb 16, 2026
Copilot AI requested a review from ehsteve February 16, 2026 22:06
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