Skip to content

Commit

Permalink
more test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislovecnm committed Oct 14, 2016
1 parent 442b851 commit 6b00f9b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions upup/pkg/fi/cloudup/tagbuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ type ClusterParams struct {
UpdatePolicy string
}

func buildCluster(args interface{}) *api.Cluster {
func buildCluster(clusterArgs interface{}) *api.Cluster {

if args == nil {
args = ClusterParams{CloudProvider: "aws", KubernetesVersion: "1.4.0"}
if clusterArgs == nil {
clusterArgs = ClusterParams{CloudProvider: "aws", KubernetesVersion: "1.4.0"}
}

cParams := args.(ClusterParams)
cParams := clusterArgs.(ClusterParams)

if cParams.CloudProvider == "" {
cParams.CloudProvider = "aws"
Expand Down Expand Up @@ -51,11 +51,11 @@ func TestBuildTags_CloudProvider_AWS(t *testing.T) {
}

if _, found := tags["_aws"]; !found {
t.Fatalf("tag _aws not found")
t.Fatal("tag _aws not found")
}

if _, found := tags["_networking_cni"]; !found {
t.Fatalf("tag _networking_cni not found")
t.Fatal("tag _networking_cni not found")
}

nodeUpTags, err := buildNodeupTags(api.InstanceGroupRoleNode, c, tags)
Expand All @@ -64,7 +64,7 @@ func TestBuildTags_CloudProvider_AWS(t *testing.T) {
}

if !stringSliceContains(nodeUpTags, "_aws") {
t.Fatalf("nodeUpTag _aws not found")
t.Fatal("nodeUpTag _aws not found")
}
}

Expand Down Expand Up @@ -103,7 +103,7 @@ func TestBuildTags_UpdatePolicy_Nil(t *testing.T) {
}

if !stringSliceContains(nodeUpTags, "_automatic_upgrades") {
t.Fatalf("nodeUpTag _automatic_upgrades not found")
t.Fatal("nodeUpTag _automatic_upgrades not found")
}
}

Expand All @@ -121,7 +121,7 @@ func TestBuildTags_UpdatePolicy_None(t *testing.T) {
}

if stringSliceContains(nodeUpTags, "_automatic_upgrades") {
t.Fatalf("nodeUpTag _automatic_upgrades found unexpectedly")
t.Fatal("nodeUpTag _automatic_upgrades found unexpectedly")
}
}

Expand Down

0 comments on commit 6b00f9b

Please sign in to comment.