Inconsistent log levels for test names
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Bắt đầu với các điểm logging trong pkg/types/v2/file_existence.go, file_content.go, command.go, licenses.go và metadata.go. Chạy lệnh container-structure-test được cung cấp với --verbosity info và cấu hình mẫu để so sánh đầu ra hiện tại. Được xem là hoàn thành khi mọi tên test được liệt kê đều hiển thị nhất quán ở mức info, trong khi đầu ra debug vẫn khả dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Different tests log their name at different log levels:
Infolevel logging:Debuglevel logging:- command: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/command.go#L84
- licenses: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/licenses.go#L66
- Metadata: https://github.com/GoogleContainerTools/container-structure-test/blob/main/pkg/types/v2/metadata.go#L93
If container-structure-test runs with --verbosity info and --output <json, junit> --test-report <outfile>, we can't see all the tests that are being run.
Not knowing what tests will run is a possibility in complex build environments where the configuration for container-structure-tests is generated at test time. Therefore it is helpful for all of this information to be available in a consistent manner without having to
I think it would make sense to make all the tests log their name at info level; this way it doesn't affect anyone was using --verbosity debug, whilst allowing those at --verbosity info to see all the tests being run.
Replication
With the following config.yml:
schemaVersion: "2.0.0"
fileExistenceTests:
- name: "sh existence"
path: "/bin/sh"
metadataTest:
entrypoint: []
Running with the flags info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml will give us the following results:
-
with
--verbosity info$ container-structure-test test --verbosity info --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence -
with
--verbosity debug:$ container-structure-test test --verbosity debug --image docker.io/library/alpine:latest --config config.yml --output junit --test-report out.xml INFO[0000] container-structure-test &{Version:1.19.1 GitVersion: BuildDate:2024-07-22T18:56:16Z GoVersion:go1.22.5 Compiler:gc Platform:linux/amd64} INFO[0000] File Existence Test: sh existence DEBU[0000] Metadata Test
- Ngôn ngữ chính
- Go
- Star
- 2.5k
- Fork
- 213
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GoogleContainerTools/container-structure-test
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
allstar
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
GoogleContainerTools/container-structure-test#393 · 639 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GoogleContainerTools/container-structure-test#280 · 1 reaction ·
-
go.mod pins vulnerable docker/containerd modules; two open Dependabot PRs clear most findingsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Windows: structure_test binary missing .exe extension causes "Open With" dialog instead of running testsCó thể đã có người làm @peakschris đã nhận 145 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Tất cả issue của GoogleContainerTools/container-structure-test
Issue tương tự
-
🐛 tunnel diag: Docker log collection deadlocks when the container's stderr log exceeds 64 KiBĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cloudflare/cloudflared#1783 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
orchestration.migration.data.tasks.retry values are ignored by the 8.8 data migration jobCó thể đã có người làm @irisfield đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
camunda/camunda-platform-helm#7773 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceNameCó thể đã có người làm @a1h8 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
Maintainer thường phản hồi trong vòng 1 ngày