Skip to content

Conversation

@aaronwalker
Copy link
Member

Fix WAF Component Tests

This PR updates the WAF component tests to properly match the WAF Classic implementation:

Changes

  • Update test configuration to use WAF Classic resources
  • Fix resource names and properties in tests
  • Update output tests to match WAF Classic outputs
  • Add --no-validate flag to skip AWS credential validation
  • Clear default config to prevent duplication

Test Configuration

control_ipset:
  - name: wafrBlacklistIpSet
    ipsetdescriptors:
      - type: IPV4
        value: 192.0.2.44/32

wafrules:
  - ruleid: wafrIPBlockRule
    predicates:
      - conditionName: wafrBlacklistIpSet
        negated: false
        type: IPMatch

wafacl:
  name: test-waf
  metricName: TestWAF
  rules:
    - ruleid: wafrIPBlockRule
      action: BLOCK
      priority: 1

Testing

To run the tests locally:

VALIDATE=--no-validate rspec spec/default_spec.rb

- Update test configuration to use WAF Classic resources
- Fix resource names and properties in tests
- Update output tests to match WAF Classic outputs
- Add --no-validate flag to skip AWS credential validation
- Clear default config to prevent duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant