Skip to content

Commit

Permalink
Address small comments
Browse files Browse the repository at this point in the history
network policy -> NetworkPolicy
Change `Fatalf` in defer func to `Errorf`
Remove double quotation

Signed-off-by: wgrayson <[email protected]>
  • Loading branch information
GraysonWu committed May 24, 2021
1 parent 86e9222 commit 662649c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/kind/kind-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function create {
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
featureGates:
"NetworkPolicyEndPort": true
NetworkPolicyEndPort: true
networking:
disableDefaultCNI: true
podSubnet: $POD_CIDR
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/networkpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ func TestIngressPolicyWithoutPortNumber(t *testing.T) {

func TestIngressPolicyWithEndPort(t *testing.T) {
skipIfHasWindowsNodes(t)
skipIfProviderIs(t, "Jenkins", "Jenkins testbed doesn't support EndPort feature for now.")

data, err := setupTest(t)
if err != nil {
Expand Down Expand Up @@ -895,7 +896,6 @@ func TestIngressPolicyWithEndPort(t *testing.T) {
t.Fatalf("Pod %s should be able to connect %s, but was not able to connect", clientName, net.JoinHostPort(serverIP, fmt.Sprint(port)))
}
}

}

if clusterInfo.podV4NetworkCIDR != "" {
Expand Down Expand Up @@ -934,11 +934,11 @@ func TestIngressPolicyWithEndPort(t *testing.T) {
}
np, err := data.createNetworkPolicy("test-networkpolicy-ingress-with-endport", spec)
if err != nil {
t.Fatalf("Error when creating network policy: %v", err)
t.Fatalf("Error when creating NetworkPolicy: %v", err)
}
defer func() {
if err = data.deleteNetworkpolicy(np); err != nil {
t.Fatalf("Error when deleting network policy: %v", err)
t.Errorf("Error when deleting NetworkPolicy: %v", err)
}
}()

Expand Down

0 comments on commit 662649c

Please sign in to comment.