Skip to content

Unicron v3 apis test coverage dev 5#4851

Merged
lukaszgryglicki merged 12 commits intodevfrom
unicron-v3-apis-test-coverage-dev-5
Nov 5, 2025
Merged

Unicron v3 apis test coverage dev 5#4851
lukaszgryglicki merged 12 commits intodevfrom
unicron-v3-apis-test-coverage-dev-5

Conversation

@lukaszgryglicki
Copy link
Member

Continue work on V3 E2E test coverage + util scripts for V3/V4.

Note that this is WIP.

cc @mlehotskylf @ahmedomosanya @jarias-lfx

Signed-off-by: Lukasz Gryglicki lgryglicki@cncf.io

Assisted by OpenAI

Assisted by GitHub Copilot

Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

74 files out of 281 files are above the max files limit of 200.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch unicron-v3-apis-test-coverage-dev-5

Comment @coderabbitai help to get the list of available commands and usage tips.

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 pull request adds comprehensive V4 API testing infrastructure and scripts for the EasyCLA project. It introduces validation tools, test suites, and utility scripts to ensure V4 API endpoints are properly tested and working.

Key changes:

  • Added validation script to test all V4 and V3 APIs and verify API coverage
  • Created test suite scripts for multiple V4 API categories (signatures, templates, sign, project, etc.)
  • Added individual API endpoint testing scripts across various V4 categories
  • Included Python script generator for automated creation of missing API scripts

Reviewed Changes

Copilot reviewed 281 out of 281 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
utils/validate_all_apis.sh Main validation script that tests V3/V4 API endpoints and reports coverage statistics
utils/v4/test_all_v4_scripts.sh Tests syntax and execution of all V4 API scripts
utils/v4/test_all_v4_apis.sh Comprehensive test suite runner for all V4 API categories
utils/v4/test_all_scripts.sh Tests all V4 scripts can execute from project root
utils/v4/template/*.sh Template API endpoint scripts (GET, POST, preview operations)
utils/v4/signatures/*.sh Signature API endpoint scripts (download, update, whitelist operations)
utils/v4/sign/*.sh Sign API endpoint scripts (corporate, individual, Gerrit, GitLab signing)
utils/v4/project/*.sh Project API endpoint scripts (CRUD operations and queries)
utils/v4/gitlab-/.sh GitLab integration scripts (organizations, repositories, activities, sign)
utils/v4/github-/.sh GitHub integration scripts (organizations, repositories, activities)
utils/v4/gerrits/*.sh Gerrit integration scripts
utils/v4/events/*.sh Event API endpoint scripts
utils/v4/foundation/*.sh Foundation mapping scripts
utils/v4/current-user/*.sh Current user API scripts
utils/v4/company/*.sh Company API endpoint scripts
utils/v4/shared/validate_params.sh Shared parameter validation utilities
utils/v4/generate_missing_scripts.py Python script to auto-generate missing API scripts from Swagger
utils/v4/final_coverage_report.sh Final coverage report generator
utils/v4/simple_test.sh Simple test script for key V4 endpoints
utils/v4/health/get_health_check.sh Health check endpoint script
utils/v4/docs/*.sh API documentation endpoint scripts

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

@@ -0,0 +1,29 @@
#!/bin/bash
# GET /template/{claGroupID}/preview
# Getclatemplatepreview (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing space in description. Should be "Get cla template preview" instead of "Getclatemplatepreview".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,37 @@
#!/bin/bash
# POST /clagroup/{claGroupID}/template
# Createclagrouptemplate (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing spaces in description. Should be "Create cla group template" instead of "Createclagrouptemplate".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,38 @@
#!/bin/bash
# PUT /cla-group/{claGroupID}/user/{userID}/icla
# Invalidateicla (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing space in description. Should be "Invalidate icla" instead of "Invalidateicla".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,38 @@
#!/bin/bash
# PUT /signatures/company/{companyID}/clagroup/{claGroupID}/ecla-auto-create
# Eclaautocreate (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing spaces in description. Should be "Ecla auto create" instead of "Eclaautocreate".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,37 @@
#!/bin/bash
# POST /signatures/{signatureID}/gh-org-whitelist
# Addgithuborgallowlist (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing spaces in description. Should be "Add github org allowlist" instead of "Addgithuborgallowlist".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,29 @@
#!/bin/bash
# GET /cla-group/{claGroupID}/corporate-contributors
# Listclagroupcorporatecontributors (authenticated)
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Missing spaces in description. Should be "List cla group corporate contributors" instead of "Listclagroupcorporatecontributors".

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +31
import {
validate_200_Status,
validate_204_Status,
validate_401_Status,
validate_expected_status,
validateApiResponse,
getTokenKey,
getAPIBaseURL,
getXACLHeaders,
} from '../../support/commands';
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Unused imports validateApiResponse, validate_200_Status, validate_204_Status, validate_401_Status.

Copilot uses AI. Check for mistakes.
const claEndpoint = getAPIBaseURL('v3');
let allowFail: boolean = !(Cypress.env('ALLOW_FAIL') === 1);
const timeout = 180000;
const local = Cypress.env('LOCAL');
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Unused variable local.

Suggested change
const local = Cypress.env('LOCAL');

Copilot uses AI. Check for mistakes.
import yaml
import os
import re
import json
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Copilot uses AI. Check for mistakes.
import yaml
import os
import re
import json
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Copilot uses AI. Check for mistakes.
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)
@lukaszgryglicki lukaszgryglicki merged commit bb63d7d into dev Nov 5, 2025
3 of 6 checks passed
@lukaszgryglicki lukaszgryglicki deleted the unicron-v3-apis-test-coverage-dev-5 branch November 5, 2025 08:38
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