wso2 / wso2/api-platform

Godog strict mode not enabled in gateway/it tests, so undefined steps can pass silently

Open
#962 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type/Improvement
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Current Limitation

The integration test suite in api-platform/gateway/it runs Godog without Strict=true. This means undefined or pending steps do not fail the suite, which can allow unimplemented steps to be reported as passing.

suite_test.go defines godog.Options without setting Strict.
In Godog v0.15.0, Strict=false causes undefined/pending steps to not fail the scenario/suite (suite.shouldFail returns s.strict for ErrUndefined/ErrPending).

Risk

We get false positives when step definitions are missing or pending.

Suggested Improvement

Set Strict: true in the godog.Options struct

Version

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The integration tests are in api-platform/gateway/it, and suite_test.go defines the godog.Options. Start by reading that options setup, then run the gateway integration tests; done means undefined or pending steps fail the suite instead of passing silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.