golang-testing
Build Reliable Go Tests
Go test suites can miss edge cases, leak goroutines, and fail unpredictably. This skill guides test design, review, and debugging with concrete Go testing patterns.
التثبيت باستخدام Agent لدي
انسخ هذا الطلب إلى Agent لديك. يتضمن صفحة Skill المعتمدة وملف manifest.
Review the Skillstore skill "golang-testing" from https://skillstore.io/skills/samber-golang-testing.md and its manifest at https://skillstore.io/api/skills/samber-golang-testing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.يجب أن يواصل Agent عرض خطته وطلب أي تأكيد تفرضه سياسة الأمان.
موارد مهيّأة لـ Agents
استخدم هذه الروابط عندما يحتاج AI Agent أو crawler أو script إلى سياق نظيف بدلًا من قراءة الصفحة كاملة.
اختبرها
جارٍ استخدام "golang-testing". Review tests that report every price subtest as passing even when the parent fails.
النتيجة المتوقعة:
- Finding: the assertion helper captures the parent test instead of the current subtest.
- Correction: create the assertion helper inside each subtest.
- Verification: deliberately break one expected result and confirm that the matching subtest reports failure.
جارٍ استخدام "golang-testing". Plan tests for a PostgreSQL order repository without affecting normal unit tests.
النتيجة المتوقعة:
- Separate database tests with an integration build tag.
- Start a disposable fixture, load the schema, reset records between tests, and close connections during teardown.
- Bind fixture ports to loopback and keep production credentials out of the test environment.
- Cover creation, missing records, user filtering, and database errors.
جارٍ استخدام "golang-testing". Improve tests for a worker pool that may leak goroutines.
النتيجة المتوقعة:
- Add package-level goroutine leak checks and verify shutdown after queued work completes.
- Coordinate workers with explicit synchronization instead of arbitrary delays.
- Run concurrent access tests with race detection and keep each test independently runnable.
التدقيق الأمني
مخاطر متوسطةAll 135 static alerts are false positives involving documentation, Go syntax, mocks, or explicit test operations. A separate integration fixture exposes weakly authenticated PostgreSQL and unauthenticated Redis through unrestricted host port bindings. No evidence found of malicious intent, credential exfiltration, or security-review prompt injection.
مخاوف أمنية مؤكدة (1)
عوامل الخطر
⚙️ الأوامر الخارجية (50)
🌐 الوصول إلى الشبكة (6)
📁 الوصول إلى نظام الملفات (2)
⚡ يحتوي على سكربتات (6)
🔑 متغيرات البيئة (1)
شارك واستشهد بهذا التقرير
شارك تقرير التقييم المرتبط بالإصدار والشارة المحايدة وبطاقة التضمين والاستشهادات. تعرض Skillstore الأدلة من دون أن تقرر ما إذا كانت هذه المهارة آمنة.
نسخ رابط التقرير
https://skillstore.io/skills/samber-golang-testing/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportشارة Markdown
[](https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge)شارة HTML
<a href="https://skillstore.io/skills/samber-golang-testing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-testing/security.svg" alt="Skillstore security assessment" loading="lazy"></a>بطاقة قابلة للتضمين
<iframe src="https://skillstore.io/embed/skills/samber-golang-testing.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>الاستشهادات الأكاديمية (APA · BibTeX · CFF)
اقتباس APA
samber. (2026). golang-testing security audit report (audit version 1) [Author version 1.4.0]. Skillstore. https://skillstore.io/skills/samber-golang-testing/audits/1اقتباس BibTeX
@techreport{samber-samber-golang-testing-2026,
author = {samber},
title = {golang-testing security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-testing/audits/1},
note = {Author version 1.4.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-testing security audit report (audit version 1)"
version: "1.4.0"
type: report
authors:
- name: "samber"
date-released: "2026-10-15"
url: "https://skillstore.io/skills/samber-golang-testing/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-testing:audit:1"
description: "Skillstore immutable audit report identifier"
مقارنة المتغيرات
2 متغيرات قابلة للتثبيتتبقى مهارة كل مؤلف عنصراً مستقلاً قابلاً للتثبيت. يُرتب المتغير الموصى به وفق أدلة Skillstore.
سبب تصدر هذا المتغير
89jobrien-golang-testing
2026-10-18
samber-golang-testing
2026-10-16
تقييم Skillstore
سبب هذا التقييم موثوقية الأدلة: متوسطما الذي يمكنك بناؤه
Add Unit Coverage
Create named subtests for public functions, boundary inputs, and error paths without coupling tests to private fields.
Review Test Reliability
Inspect pull request tests for assertion scope errors, shared mutable state, timing dependencies, and missing race checks.
Organize Integration Testing
Plan build-tagged database suites with fixture setup, per-test cleanup, and isolated test services.
جرّب هذه الموجّهات
Write named table-driven tests for [function]. Cover normal inputs, empty inputs, boundary cases, and documented errors. Assert observable results.
Test [handler] using request and response recorders. Cover valid requests, malformed bodies, missing authentication, and validation errors. Assert status, headers, and response content.
Investigate flaky tests in [package]. Check shared state, goroutine cleanup, assertion scope, and timing dependencies. Propose deterministic tests and race detection commands.
Audit [repository] for unit coverage gaps, integration isolation, and goroutine risks. Separate findings by concern. Prioritize fixes with evidence and focused tests. Require disposable databases and loopback-only services.
أفضل الممارسات
- Assert public behavior with named cases, including boundary inputs and failure paths.
- Use disposable fixtures, loopback-only services, and explicit cleanup for integration tests.
- Match examples to your Go version and run focused tests before expanding coverage.
تجنب
- Treating a high coverage percentage as proof that assertions are correct.
- Sharing mutable fixtures, relying on execution order, or using arbitrary sleeps for synchronization.
- Running destructive fixture cleanup against shared databases or exposing test services to untrusted networks.