Skip to content

Commit

Permalink
Combine network tests and gitignore .vscode
Browse files Browse the repository at this point in the history
Signed-off-by: chjmil <christopher.miller@sas.com>
  • Loading branch information
saschjmil committed Feb 6, 2025
1 parent 131d7d7 commit a4cabbc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 155 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ terraform.tfvars
.terraform.lock.hcl
.DS_Store
sas_iac_buildinfo.yaml
.vscode
19 changes: 19 additions & 0 deletions test/default_integration_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,25 @@ func TestDefaults(t *testing.T) {
egressType := cluster.AttributeValues["network_profile"]
actualEgressType := egressType.([]interface{})[0].(map[string]interface{})["outbound_type"]
assert.Equal(t, expectedClusterEgressType, actualEgressType, "Unexpected Cluster Egress Type")

//aks_network_plugin
var expectedNetworkPlugin interface{} = "kubenet"
networkPlugin := cluster.AttributeValues["network_profile"]
actualNetworkPlugin := networkPlugin.([]interface{})[0].(map[string]interface{})["network_plugin"]
assert.Equal(t, expectedNetworkPlugin, actualNetworkPlugin, "Unexpected Network Plugin")

// aks_network_policy cannot be tested since it is set after the apply.
/*var expectedNetworkPolicy interface{} = "calico"
networkPolicy := cluster.AttributeValues["network_profile"]
actualNetworkPolicy := networkPolicy.([]interface{})[0].(map[string]interface{})["network_policy"]
assert.Equal(t, expectedNetworkPolicy, actualNetworkPolicy, "Unexpected Network Policy")
// aks_network_plugin_mode this cannot be tested since it defaults to null
/*var expectedNetworkPluginMode interface{} = "overlay"
networkPluginMode := cluster.AttributeValues["network_profile"]
actualNetworkPluginMode := networkPluginMode.([]interface{})[0].(map[string]interface{})["network_plugin_mode"]
assert.Equal(t, expectedNetworkPluginMode, actualNetworkPluginMode, "Unexpected Network Plugin Mode") */

// partner_id - Not present in tfplan

// create_static_kubeconfig
Expand Down
155 changes: 0 additions & 155 deletions test/network_test.go

This file was deleted.

0 comments on commit a4cabbc

Please sign in to comment.