Restore upstream sanity tests t/003safesys.t and t/013dbschema.t#160
Open
mrenvoize wants to merge 1 commit into
Open
Restore upstream sanity tests t/003safesys.t and t/013dbschema.t#160mrenvoize wants to merge 1 commit into
mrenvoize wants to merge 1 commit into
Conversation
These two sanity tests exist upstream but were dropped during Harmony's
divergence. Restoring them re-adds cheap, orthogonal guardrails.
t/013dbschema.t (SQL reserved-word check):
- Adapted to Harmony's schema API: use the positional-driver factory
Bugzilla::DB::Schema->new('Mysql') instead of upstream's Moo-style
->new(db => $fake_db), which Harmony does not have.
- Whitelisted ACTION, DATA, DOMAIN and TIMESTAMP, following upstream's
existing practice of exempting words that are already used as table/
column names (VALUE, TYPE, ALIAS, COALESCE). These four are used by
the AntiSpam, BugmailFilter, Push and RequestNagger tables and are
safe on every supported backend because Bugzilla quotes identifiers.
t/003safesys.t (safe system/exec usage):
- Passes 653/653 after fixing one call in RequestNagger's
send-request-nags.pl to pass the program and its arguments explicitly
(system($command[0], @command[1 .. $#command])) so it satisfies the
Support::Systemexec prototype instead of passing a single list.
t/001compile.t is intentionally NOT restored here: making it pass requires
updating the shared t/Support/Files.pm to understand Harmony's
Bugzilla::Extension:: module layout and to skip .disabled files and
feature-gated modules. That is tracked as separate follow-up work.
5b97e93 to
ffc23eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These two sanity tests exist in 5.2 but were dropped during Harmony's divergence. Restoring them re-adds cheap, orthogonal guardrails.
t/013dbschema.t (SQL reserved-word check):
t/003safesys.t (safe system/exec usage):
t/001compile.t is intentionally NOT restored here: making it pass requires updating the shared t/Support/Files.pm to understand Harmony's Bugzilla::Extension:: module layout and to skip .disabled files and feature-gated modules. That is tracked as separate follow-up work.