payment: test fixtures hardcode real gateway names (govpay/lankapay) instead of generic placeholders
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
Línea de trabajo
Lee payment/service_test.go, payment/handler_test.go y payment/registry_test.go; usa los ID genéricos existentes, como gw1, como convención. Sustituye de manera coherente los ID de fixture govpay y lankapay, y luego ejecuta las pruebas del paquete de pagos. El trabajo estará terminado cuando las pruebas pasen con ID genéricos de marcador de posición y sin cambios de comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
core/payment's own unit tests hardcode a real downstream consumer's gateway name — \"govpay\" — as the fixture gatewayID throughout payment/service_test.go (~25 occurrences) and payment/handler_test.go (4 occurrences), and \"lankapay\" in a couple of places in payment/registry_test.go. Predates #118 (confirmed via git show against a commit before that PR's branch point), though #118 added a few more occurrences following the existing convention.
core/payment is a generic, gateway-agnostic SDK — its own README describes it as "designed to be imported and integrated into other repositories," with GovPay+/LankaPay named only as examples of gateways a consumer might wire up, not anything baked into the framework itself. Hardcoding a specific real downstream integration's name into the framework's own generic unit tests:
- Couples tests that are actually exercising generic
PaymentGateway/PaymentService/HTTPHandlermechanics to an integration that doesn't even live in this repo (GovPay+ lives innsw-srilanka). - Reads as if there's GovPay+-specific behavior being tested here, when there isn't — the tests would behave identically with any gateway ID.
- Is already inconsistent within the package:
registry_test.gouses clearly-generic placeholder IDs (gw1,method1,method2) in most of its tests, but real names (lankapay) in a couple of others.
Proposed Solution
Standardize on the generic-placeholder convention registry_test.go already partially establishes (e.g. gw1) across service_test.go and handler_test.go, replacing the govpay/lankapay fixture IDs. Mechanical rename, no behavior change — tests pass identically regardless of the string used as the gateway ID.
Scope note
Deliberately not bundled into #118 (which is otherwise unrelated in scope) — flagged there during review and split out as its own follow-up per that PR's discussion.
- Lenguaje dominante
- Go
- Estrellas
- 6
- Forks
- 8
- Merge medio
- 21 h 36 min
- PR fusionados (30 d)
- 42
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenNSW/core
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
nsw-sl cleanup Type/Improvement
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
remote: let the host inject a logger, and log with one consistent policyPosiblemente ocupada @mushrafmim la tomó hace 5 días. AbiertoType/Improvement
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
Los mantenedores suelen responder en 1 día
-
taskflow: run extensions through one dispatcher and tell them which phase they run inPosiblemente ocupada @mushrafmim la tomó hace 11 días. AbiertoType/Improvement
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
Los mantenedores suelen responder en 1 día
Todos los issues de OpenNSW/core
Issues similares
-
☢️ Bug v3
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
area/import-export area/projects concern/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
go-vikunja/vikunja#4455 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dependabot PRs no longer merge automaticallyPosiblemente ocupada @dwisiswant0 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
projectdiscovery/urlfinder#160 ·
Los mantenedores suelen responder en 1 día
-
database
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
chnm/legal-modernism#450 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día