📝 docs: add ADR for staged-only Git hooks formatting
- Add ADR-0012 documenting the decision to format only staged Go files - Update ADR README.md with new entry - Document rationale, alternatives, and verification results - Include future considerations for monitoring and CI/CD integration Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -19,8 +19,8 @@ func NewStepContext(client *testserver.Client) *StepContext {
|
||||
return &StepContext{client: client}
|
||||
}
|
||||
|
||||
// Initialize<Feature>Steps registers step definitions for <feature>
|
||||
func Initialize<Feature>Steps(ctx *godog.ScenarioContext, client *testserver.Client) {
|
||||
// InitializeSteps registers step definitions for the feature
|
||||
func InitializeSteps(ctx *godog.ScenarioContext, client *testserver.Client) {
|
||||
sc := NewStepContext(client)
|
||||
|
||||
// Use Godog's EXACT regex patterns and parameter names
|
||||
@@ -46,18 +46,18 @@ func (sc *StepContext) iRequestTheHealthEndpoint() error {
|
||||
func (sc *StepContext) theResponseShouldBe(arg1, arg2 string) error {
|
||||
// The regex captures the full JSON from the feature file, including quotes
|
||||
// We need to extract just the key and value without the surrounding quotes and backslashes
|
||||
|
||||
|
||||
// Remove the surrounding quotes and backslashes
|
||||
cleanArg1 := strings.Trim(arg1, `"\`)
|
||||
cleanArg2 := strings.Trim(arg2, `"\`)
|
||||
|
||||
|
||||
// Build the expected JSON string
|
||||
expected := fmt.Sprintf(`{"%s":"%s"}`, cleanArg1, cleanArg2)
|
||||
|
||||
|
||||
return sc.client.ExpectResponseBody(expected)
|
||||
}
|
||||
|
||||
func (sc *StepContext) theServerIsRunning() error {
|
||||
// Actually verify the server is running by checking the readiness endpoint
|
||||
return sc.client.Request("GET", "/api/ready", nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user