Fix for networkPolicyEnabled test - must explicitly add default network policy. (#1363)

This commit is contained in:
Nathan McKinley 2018-04-20 11:39:20 -07:00 committed by GitHub
parent dae4c6ced5
commit de9363502b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1456,6 +1456,12 @@ func flattenNetworkPolicy(c *containerBeta.NetworkPolicy) []map[string]interface
"enabled": c.Enabled,
"provider": c.Provider,
})
} else {
// Explicitly set the network policy to the default.
result = append(result, map[string]interface{}{
"enabled": false,
"provider": "PROVIDER_UNSPECIFIED",
})
}
return result
}