Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Fix test for Egress only policy #17

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Fix test for Egress only policy #17

merged 1 commit into from
Apr 5, 2022

Conversation

MrTrustor
Copy link
Member

One of our test case was using the following test FQDNNetworkpolicy:

apiVersion: networking.gke.io/v1alpha2
kind: FQDNNetworkPolicy
metadata:
  name: fqdnnetworkpolicy-valid
spec:
  podSelector: {}
  policyType: Egress
  egress:
    - to:
      - fqdns:
        - github.com
        - gitlab.com
      ports:
      - port: 443
        protocol: TCP

The section policyType: Egress is not valid and was ignored.
It should be:

policyTypes:
- Egress

I've fixed this mistake, and updated the unit test to make sure that we check the policyTypes on this example.

Fix #16

@MrTrustor MrTrustor requested a review from thesmiler May 10, 2021 09:16
@MrTrustor MrTrustor merged commit bd18fcd into main Apr 5, 2022
@MrTrustor MrTrustor deleted the fix-16 branch April 5, 2022 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Egress only fqdnetworkpolicy creates Ingress+Egress networkpolicy
1 participant