Add comments, t.Parallel()
This commit is contained in:
		@@ -25,6 +25,8 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestGetLoadBalancer(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -50,6 +52,8 @@ func TestGetLoadBalancer(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerCreatesExternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -66,6 +70,8 @@ func TestEnsureLoadBalancerCreatesExternalLb(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerCreatesInternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -82,6 +88,8 @@ func TestEnsureLoadBalancerCreatesInternalLb(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerDeletesExistingInternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -102,6 +110,8 @@ func TestEnsureLoadBalancerDeletesExistingInternalLb(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerDeletesExistingExternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -123,6 +133,8 @@ func TestEnsureLoadBalancerDeletesExistingExternalLb(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerDeletedDeletesExternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
@@ -140,6 +152,8 @@ func TestEnsureLoadBalancerDeletedDeletesExternalLb(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEnsureLoadBalancerDeletedDeletesInternalLb(t *testing.T) {
 | 
			
		||||
	t.Parallel()
 | 
			
		||||
 | 
			
		||||
	vals := DefaultTestClusterValues()
 | 
			
		||||
	gce, err := fakeGCECloud(vals)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
 
 | 
			
		||||
@@ -214,7 +214,7 @@ func assertExternalLbResources(t *testing.T, gce *GCECloud, apiService *v1.Servi
 | 
			
		||||
 | 
			
		||||
	// Check that Firewalls are created for the LoadBalancer and the HealthCheck
 | 
			
		||||
	fwNames := []string{
 | 
			
		||||
		MakeFirewallName(lbName),
 | 
			
		||||
		MakeFirewallName(lbName), // Firewalls for external LBs are prefixed with k8s-fw-
 | 
			
		||||
		MakeHealthCheckFirewallName(vals.ClusterID, hcName, true),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -291,7 +291,7 @@ func assertInternalLbResources(t *testing.T, gce *GCECloud, apiService *v1.Servi
 | 
			
		||||
 | 
			
		||||
	// Check that Firewalls are created for the LoadBalancer and the HealthCheck
 | 
			
		||||
	fwNames := []string{
 | 
			
		||||
		lbName,
 | 
			
		||||
		lbName, // Firewalls for internal LBs are named the same name as the loadbalancer.
 | 
			
		||||
		makeHealthCheckFirewallName(lbName, vals.ClusterID, true),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user