linode / terraform-provider-linode

Terraform Linode provider
https://www.terraform.io/docs/providers/linode/
Mozilla Public License 2.0
202 stars 98 forks source link

Skip `TestAccResourceInstance_requestQuantity` #1575

Closed zliang-akamai closed 2 months ago

zliang-akamai commented 2 months ago

📝 Description

After firewall migration, one instance test is failing because it's using the older testing provider rather than the providers factory, and the firewall resource has been migrated and no longer available in the older provider.

I tried modifying the client after provider server creation in the factory, but it reported a nil pointer issue, probably meaning that the provider has not been initialized at that point:

func GetProtoV5ProviderFactories(clientModifiers ...func(*linodego.Client)) map[string]func() (tfprotov5.ProviderServer, error) {
    return map[string]func() (tfprotov5.ProviderServer, error){
        "linode": func() (tfprotov5.ProviderServer, error) {
            ctx := context.Background()
            providers := []func() tfprotov5.ProviderServer{
                TestAccProviders["linode"].GRPCProvider,
                providerserver.NewProtocol5(
                    TestAccFrameworkProvider,
                ),
            }

            muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...)
            if err != nil {
                return nil, err
            }

            server := muxServer.ProviderServer()

            for _, m := range clientModifiers {
                m(&TestAccProviders["linode"].Meta().(*helper.ProviderMeta).Client)
                m(TestAccFrameworkProvider.Meta.Client)
            }

            return server, nil
        },
    }
}

We might want to skip this test until we figuring out what's next.

✔️ How to Test

make int-test PKG_NAME="linode/instance" ARGS="-run TestAccResourceInstance_requestQuantity"
zliang-akamai commented 2 months ago

Just realized there were some undesired changes included, just removed. @jriddle-linode @ykim-1