NaverCloudPlatform / terraform-provider-ncloud

Terraform NaverCloud provider
https://registry.terraform.io/providers/NaverCloudPlatform/ncloud/latest/docs
Mozilla Public License 2.0
98 stars 72 forks source link

AccTest: nas volume test failure #299

Open wonchulee opened 1 year ago

wonchulee commented 1 year ago

Community Note

Terraform CLI and Terraform Ncloud Provider Version

Terraform version : v1.5.2
Ncloud Provider version : main(2.3.18)

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# None

Debug Output

=== RUN   TestAccResourceNcloudNasVolume_classic_changeAccessControl
    nas_volume_test.go:113: Step 2/3 error: Error running apply: exit status 1

        Error: Status: 400 Bad Request, Body: {
          "responseError": {
            "returnCode": "1413",
            "returnMessage": "Cannot find matched product code [SPSVRSTAND000004] matching server image [SPSW0LINUX000032]"
          }
        }

          with ncloud_server.server-foo,
          on terraform_plugin_test.tf line 7, in resource "ncloud_server" "server-foo":
           7: resource "ncloud_server" "server-foo" {

        Error: Status: 400 Bad Request, Body: {
          "responseError": {
            "returnCode": "1413",
            "returnMessage": "Cannot find matched product code [SPSVRSTAND000004] matching server image [SPSW0LINUX000032]"
          }
        }

          with ncloud_server.server-bar,
          on terraform_plugin_test.tf line 13, in resource "ncloud_server" "server-bar":
          13: resource "ncloud_server" "server-bar" {

--- FAIL: TestAccResourceNcloudNasVolume_classic_changeAccessControl (19.60s)
=== RUN   TestAccResourceNcloudNasVolume_vpc_changeAccessControl
    nas_volume_test.go:149: Step 2/3 error: After applying this test step, the plan was not empty.
        stdout:

        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place

        Terraform will perform the following actions:

          # ncloud_nas_volume.test will be updated in-place
          ~ resource "ncloud_nas_volume" "test" {
                id                             = "18152516"
                name                           = "n2926944_tfvx62d"
              ~ server_instance_no_list        = [
                  - "18152518",
                    "18152521",
                  + "18152518",
                ]
                # (13 unchanged attributes hidden)
            }

        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccResourceNcloudNasVolume_vpc_changeAccessControl (387.53s)

Panic Output

Expected Behavior

Pass the test

Actual Behavior

Test failure

Steps to Reproduce

export TF_ACC=1
export NCLOUD_REGION=KR
export NCLOUD_ACCESS_KEY=xxx
export NCLOUD_SECRET_KEY=xxx
go test ./internal/nasvolume/... -run=TestAccResourceNcloudNasVolume_classic_changeAccessControl -v
go test ./internal/nasvolume/... -run=TestAccResourceNcloudNasVolume_vpc_changeAccessControl -v

Important Factoids

References

NayeonKeum commented 1 year ago

I'll work on this issue!