Skip to content

feat: Code formatting cleanup and Postman test reorganization#240

Merged
pm7y merged 2 commits intomasterfrom
001-eventgrid-conformance-tests
Dec 26, 2025
Merged

feat: Code formatting cleanup and Postman test reorganization#240
pm7y merged 2 commits intomasterfrom
001-eventgrid-conformance-tests

Conversation

@pm7y
Copy link
Owner

@pm7y pm7y commented Dec 26, 2025

Summary

  • Apply consistent code formatting across the entire codebase using EditorConfig
  • Reorganize Postman test collections into structured directory
  • Enhance Docker configuration with dual-topic setup for comprehensive testing
  • Add TopicAuthorizationException for better error handling
  • Introduce JSON converters infrastructure

Changes

Code Quality

  • Add .editorconfig to enforce consistent code style across the project
  • Apply formatting fixes throughout codebase (trailing whitespace, line endings)
  • Enable nullable reference types support (building on feat: Enable null reference types #239)

Testing Infrastructure

  • Reorganize Postman collections: Move from root to src/postman/ directory structure
  • Delete legacy Postman collection and environment files from src/
  • Add src/postman-test-patterns.md documentation for test patterns
  • Update .gitignore to exclude test results and specs

Docker Improvements

  • Add .editorconfig to Docker build context
  • Configure dual-topic setup in appsettings.docker.json:
    • EventGridTopic (port 60101) - Event Grid Schema
    • CloudEventsTopic (port 60102) - CloudEvents v1.0 Schema
  • Add port mapping for second topic in docker-compose.yml

New Infrastructure

  • Add TopicAuthorizationException entity for authorization error handling
  • Introduce JsonConverters infrastructure directory

Copilot AI review requested due to automatic review settings December 26, 2025 05:49
Copy link

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 performs comprehensive code quality improvements and test infrastructure enhancements, including applying consistent formatting via EditorConfig, reorganizing Postman test collections into a structured directory hierarchy, enhancing Docker configuration with dual-topic setup for both EventGrid and CloudEvents schemas, and introducing new infrastructure components for better error handling and JSON parsing.

Key Changes:

  • Applied EditorConfig-based code formatting across the entire codebase (removing unnecessary braces, fixing whitespace)
  • Reorganized Postman test collections from root src/ to structured src/postman/ directory with environment-specific configurations
  • Enhanced Docker setup with dual-topic configuration supporting both EventGrid Schema (port 60101) and CloudEvents v1.0 Schema (port 60102)

Reviewed changes

Copilot reviewed 78 out of 168 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/postman/environments/*.json New structured Postman environment files for both simulator and real Azure testing
src/postman-test-patterns.md Comprehensive test patterns documentation for Azure Event Grid conformance testing
src/environments/*.json Removed legacy Postman environment files
src/Directory.Packages.props Added new package dependencies for configuration and CLI tooling
src/appsettings.json Updated with dual-topic configuration and explicit input schemas
src/AzureEventGridSimulator/Program.cs Applied code formatting cleanup (brace removal per EditorConfig)
Multiple Infrastructure/Settings/*.cs Consistent brace removal and formatting across settings classes
src/AzureEventGridSimulator/Infrastructure/Middleware/*.cs Enhanced error handling, SAS validation, and Azure-compliant behavior
src/AzureEventGridSimulator/Infrastructure/JsonConverters/*.cs New JSON converter infrastructure for lenient type coercion
src/AzureEventGridSimulator/Domain/Entities/*.cs Updated validation logic to match Azure's lenient behavior
src/AzureEventGridSimulator/Domain/Services/*.cs Enhanced parsers and formatters with improved error messages
Test files Updated test assertions to match new Azure-compliant behavior
src/.editorconfig New EditorConfig file defining project code style rules
docker/* Docker configuration updates for dual-topic setup
Comments suppressed due to low confidence (1)

src/postman-test-patterns.md:1

  • Line 221 shows 'Unauthorized' with 'InvalidSas' detail code returning 401, but earlier in the document (line 219), it states that 'BadRequest' with 'InvalidSas' returns 400. This appears inconsistent. Clarify which status code is returned for InvalidSas scenarios or document the conditions that determine whether it's a 400 vs 401 response.
# Postman Test Patterns for Azure Event Grid Conformance

@pm7y pm7y force-pushed the 001-eventgrid-conformance-tests branch from 2d9adaf to d4c6b6b Compare December 26, 2025 06:02
Copilot AI review requested due to automatic review settings December 26, 2025 06:31
Copy link

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

Copilot reviewed 83 out of 173 changed files in this pull request and generated no new comments.

@pm7y pm7y requested a review from Copilot December 26, 2025 06:32
Copy link

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

Copilot reviewed 83 out of 173 changed files in this pull request and generated 3 comments.

@pm7y pm7y force-pushed the 001-eventgrid-conformance-tests branch from b804baf to 1aafac9 Compare December 26, 2025 06:41
@pm7y pm7y requested a review from Copilot December 26, 2025 06:41
Copy link

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

Copilot reviewed 83 out of 173 changed files in this pull request and generated no new comments.

@pm7y pm7y force-pushed the 001-eventgrid-conformance-tests branch from 1aafac9 to 82a2bec Compare December 26, 2025 06:55
@pm7y pm7y requested a review from Copilot December 26, 2025 06:55
Copy link

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

Copilot reviewed 83 out of 173 changed files in this pull request and generated 1 comment.

@pm7y pm7y merged commit 79eca3d into master Dec 26, 2025
9 of 10 checks passed
@pm7y pm7y deleted the 001-eventgrid-conformance-tests branch December 26, 2025 07:05
@github-actions github-actions bot mentioned this pull request Dec 24, 2025
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.

1 participant