hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

Failing test(s): TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy #17838

Open shuyama1 opened 5 months ago

shuyama1 commented 5 months ago

Impacted tests

Affected Resource(s)

Failure rates

Message(s)

=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_one_policy
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config_update_policy_with_stopped_machine
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_remove_access_config
    vcr_utils.go:152: Step 3/4 error: Error running apply: exit status 1
        Error: Error deleting old access_config: googleapi: Error 400: Invalid value for field 'accessConfig': 'external-nat'. Cannot delete an access config with a security policy set. Please remove the security policy first., invalid
          with google_compute_instance.foobar,
          on terraform_plugin_test.tf line 119, in resource "google_compute_instance" "foobar":
         119: resource "google_compute_instance" "foobar" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_two_policies
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config
    vcr_utils.go:152: Step 3/5 error: Error running apply: exit status 1
        Error: Error deleting old access_config: googleapi: Error 400: Invalid value for field 'accessConfig': 'external-nat'. Cannot delete an access config with a security policy set. Please remove the security policy first., invalid
          with google_compute_instance.foobar,
          on terraform_plugin_test.tf line 72, in resource "google_compute_instance" "foobar":
          72: resource "google_compute_instance" "foobar" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/wit_no_access_config
    vcr_utils.go:152: Step 1/1, expected an error with pattern, no match on: Error running apply: exit status 1
        Error: Error waiting to create Network: Error waiting for Creating Network: timeout while waiting for state to become 'DONE' (last state: 'RUNNING', timeout: 20m0s)
          with google_compute_network.net,
          on terraform_plugin_test.tf line 25, in resource "google_compute_network" "net":
          25: resource "google_compute_network" "net" {
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config
=== RUN   TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_access_config_with_empty_nil_security_policy
--- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy (3101.68s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_one_policy (272.92s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config_update_policy_with_stopped_machine (226.60s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_remove_access_config (278.36s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_two_access_configs_update_two_policies (377.24s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/access_config_update_access_config (258.48s)
    --- FAIL: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/wit_no_access_config (1243.39s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_access_config (236.67s)
    --- PASS: TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy/two_nics_access_config_with_empty_nil_security_policy (208.02s)

Nightly build test history

b/336319407

karolgorc commented 1 month ago

I don't have an environment with Cloud Armor to test this but it seems that the error message expected in the tests has changed.

Here is an example

https://github.com/hashicorp/terraform-provider-google-beta/blob/314f686b0e8bdd389b95f85e574b27b57a73f122/google-beta/services/compute/resource_compute_instance_test.go#L3459-L3475