Skip to content

IE-509: added unit test cases and PR check CI#4

Merged
skyflow-srivyshnavi merged 8 commits intomainfrom
IE-509
Nov 4, 2025
Merged

IE-509: added unit test cases and PR check CI#4
skyflow-srivyshnavi merged 8 commits intomainfrom
IE-509

Conversation

@skyflow-srivyshnavi
Copy link
Collaborator

IE-509: added unit test cases and PR check CI

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive unit test coverage and CI automation for the migration utility scripts. The changes include tests for vault schema, service accounts, roles, policies, and connections migration functionality, along with a GitHub Actions workflow to run tests on pull requests.

Key changes:

  • Added unit test files covering 10+ migration modules with 95%+ coverage requirement
  • Fixed a quote style inconsistency in migrate_connections.py print statement
  • Implemented PR check CI workflow using GitHub Actions with pytest and coverage reporting

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_update_vault_schema.py Tests for vault schema update functionality including success, error handling, and script execution paths
tests/test_update_service_account.py Tests for service account updates covering metadata updates, role assignment, and error scenarios
tests/test_update_role.py Tests for role update operations including metadata changes and policy assignment
tests/test_update_policy_main.py Tests for policy update main execution flow with various input scenarios
tests/test_update_policy.py Tests for policy payload transformation logic
tests/test_migrate_vault_schema.py Tests for vault schema migration including config file handling and governance migration
tests/test_migrate_vault_roles_and_policies.py Tests for migrating vault roles and policies together
tests/test_migrate_service_accounts.py Tests for service account migration with role assignment
tests/test_migrate_roles.py Comprehensive tests for role migration including system roles and custom roles
tests/test_migrate_policies.py Tests for policy migration with rule transformation
tests/test_migrate_connections.py Tests for connection migration covering multiple scenarios and modes
tests/conftest.py Pytest configuration to set up Python path and working directory
pytest.ini Pytest configuration with coverage requirements set to 95%
migrate_connections.py Fixed quote style inconsistency in print statement
.github/workflows/ci.yml CI workflow configuration for running tests on pull requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

Copy link
Collaborator

@skyflow-vivek skyflow-vivek left a comment

Choose a reason for hiding this comment

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

I observed that most unit tests, we are setting up mocks in following manner:

my_mock = MagicMock(); my_mock.foo.bar = <value>; my_mock.foo1.bar1 = {}

Can we break these statements into separate lines like

my_mock = MagicMock()
my_mock.foo.bar = <value>
my_mock.foo1.bar1 = {}

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Gitleaks Findings: No secrets detected. Safe to proceed!

@skyflow-srivyshnavi skyflow-srivyshnavi merged commit ceba728 into main Nov 4, 2025
2 checks passed
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.

3 participants