LinuxSuRen / LinuxSuRen/api-testing

[bug] Extension Download Test Failures on darwin_arm64

Đang mở
#828 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
Go
Star
369
Fork
67
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Extension Download Test Failures on darwin_arm64

Description

The extension download functionality tests are failing when running make test on macOS with ARM64 architecture. The tests fail to find architecture-specific binaries in the mock Docker registry.

Error Details

=== FAIL: TestExtensionCmd/normal (0.01s)
Error: not found atest-store-git_darwin_arm64/atest-store-git from http://127.0.0.1:55323/v2/linuxsuren/atest-ext-store-git/manifests/0.0.2
Error: not found atest-store-orm_darwin_arm64/atest-store-orm from http://127.0.0.1:55323/v2/linuxsuren/atest-ext-store-orm/manifests/0.0.2

Environment

  • OS: macOS (Darwin 25.0.0)
  • Architecture: ARM64 (Apple Silicon)
  • Test: TestExtensionCmd in cmd/extension_test.go
  • Mock Registry: 127.0.0.1:55323

Root Cause Analysis

  1. Architecture-Specific Binary Missing: The test expects darwin_arm64 binaries but the mock Docker registry only contains limited test data
  2. Mock Registry Incomplete: The simulated registry manifests don't include all required architecture variants
  3. Platform Detection: The extension system correctly detects darwin_arm64 but can't find matching binaries

Impact

  • Extension installation tests fail on ARM64 macOS systems
  • Core API testing functionality remains unaffected
  • CI/CD might fail on ARM64 runners

Reproduction Steps

  1. Run make test on macOS with ARM64 architecture
  2. Observe TestExtensionCmd/normal test failure
  3. Check mock registry logs for missing manifest requests

Suggested Solutions

  1. Expand Mock Registry Data: Add darwin_arm64 binaries to test fixtures
  2. Platform Fallback Logic: Implement fallback to linux_amd64 for testing
  3. Skip Architecture-Specific Tests: Skip extension tests on unsupported platforms
  4. Mock Registry Enhancement: Generate complete manifest data for all supported architectures

Files Involved

  • cmd/extension_test.go:66 - Test assertion location
  • Mock registry configuration and test data
  • Extension download and platform detection logic

Priority

Low - This affects testing infrastructure but not core functionality. Extension system works in production environments with proper registries.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Start with cmd/extension_test.go:66 and run TestExtensionCmd, or reproduce with make test on darwin_arm64. Then inspect the mock registry configuration and test data for the missing architecture-specific binaries and compare the requested manifests. Done means the extension download tests pass on ARM64 macOS without affecting the existing test behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.