Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Go-tests fail. E.g. RouterBGPVRF, RouterStaticVRFIPv4Unicast and RouterStaticIPv4Unicast #267

Open
shebang42 opened this issue Nov 5, 2024 · 1 comment

Comments

@shebang42
Copy link
Contributor

RP/0/RP0/CPU0:ios#sh ver
Tue Nov  5 13:12:59.482 UTC
Cisco IOS XR Software, Version 7.9.2
> go version
go version go1.23.2 darwin/arm64

When testing #266 , the tests as described in #237 (comment) now fail. Even without these new commits.
Furthermore, the tests for RouterStaticIPv4Unicast (without the VRF) also fail. They all fail with element(s) not found: 'prefix'.

In the meantime, we have downgraded IOS-XR in our lab to 7.9.2, (possibly from 7.11.1) so it might be an incompatibility issue with this version. But my development laptop has changed as well.

Test RouterStaticVRFIPv4Unicast

terraform-provider-iosxr git:(main) IOSXR_USERNAME=cisco IOSXR_PASSWORD=cisco IOSXR_HOST=10.131.3.122:57777 TF_ACC=true go test -v -failfast -fullpath ./... -run RouterStaticVRFIPv4Unicast
?       github.com/CiscoDevNet/terraform-provider-iosxr [no test files]
?       github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider/client        [no test files]
?       github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider/helpers       [no test files]
=== RUN   TestAccDataSourceIosxrRouterStaticVRFIPv4Unicast
--- PASS: TestAccDataSourceIosxrRouterStaticVRFIPv4Unicast (4.03s)
=== RUN   TestAccIosxrRouterStaticVRFIPv4Unicast
    /Users/paul/src/cisco_orig/terraform-provider-iosxr/internal/provider/resource_iosxr_router_static_vrf_ipv4_unicast_test.go:88: Step 1/3 error: Error running post-apply refresh plan: exit status 1
        
        Error: Client Error
        
          with iosxr_router_static_vrf_ipv4_unicast.test,
          on terraform_plugin_test.tf line 11, in resource "iosxr_router_static_vrf_ipv4_unicast" "test":
          11: resource "iosxr_router_static_vrf_ipv4_unicast" "test" {
        
        Get request failed, got error: rpc error: code = NotFound desc = Requested
        element(s) not found: 'prefix'
--- FAIL: TestAccIosxrRouterStaticVRFIPv4Unicast (18.44s)
FAIL
FAIL    github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider       23.150s
FAIL

Test RouterStaticIPv4Unicast (without VRF)

(nkp) ➜  terraform-provider-iosxr git:(dependabot/github_actions/crazy-max/ghaction-import-gpg-6.2.0) IOSXR_USERNAME=cisco IOSXR_PASSWORD=i[...] IOSXR_HOST=[...] TF_ACC=true go test -v -failfast -fullpath ./... -run RouterStaticIPv4Unicast
        
<...>
          with iosxr_router_static_ipv4_unicast.test,
          on terraform_plugin_test.tf line 11, in resource "iosxr_router_static_ipv4_unicast" "test":
          11: resource "iosxr_router_static_ipv4_unicast" "test" {
        
        Get request failed, got error: rpc error: code = NotFound desc = Requested
        element(s) not found: 'prefix'
--- FAIL: TestAccIosxrRouterStaticIPv4Unicast (16.28s)
FAIL
FAIL    github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider       21.012s
FAIL

I encounter the same error when testing on an old (v0.3.2 / Commit: 372a870) version:

terraform-provider-iosxr git:(372a870) ✗ IOSXR_USERNAME=cisco IOSXR_PASSWORD=[...] IOSXR_HOST=[...] TF_ACC=true go test -v -failfast -fullpath ./... -run RouterStaticIPv4Unicast
<...>
        element(s) not found: 'prefix'

Test RouterBGPVRF

Also the test from #246 (comment) fails on the current main branch.

terraform-provider-iosxr git:(main) IOSXR_USERNAME=cisco IOSXR_PASSWORD=cisco IOSXR_HOST=10.131.3.122:57777 TF_ACC=true go test -v -failfast -fullpath ./... -run RouterBGPVRF
?       github.com/CiscoDevNet/terraform-provider-iosxr [no test files]
?       github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider/client        [no test files]
?       github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider/helpers       [no test files]
=== RUN   TestAccDataSourceIosxrRouterBGPVRFAddressFamily
--- PASS: TestAccDataSourceIosxrRouterBGPVRFAddressFamily (12.31s)
=== RUN   TestAccDataSourceIosxrRouterBGPVRFNeighborAddressFamily
    /Users/paul/src/cisco_orig/terraform-provider-iosxr/internal/provider/data_source_iosxr_router_bgp_vrf_neighbor_address_family_test.go:38: Step 1/1 error: Error running apply: exit status 1
        
        Error: Client Error
        
          with iosxr_router_bgp_vrf_neighbor_address_family.test,
          on terraform_plugin_test.tf line 76, in resource "iosxr_router_bgp_vrf_neighbor_address_family" "test":
          76: resource "iosxr_router_bgp_vrf_neighbor_address_family" "test" {
        
        Set request failed, got error: rpc error: code = Internal desc = {
         "cisco-grpc:errors": {
          "error": [
           {
            "error-type": "application",
            "error-tag": "operation-failed",
            "error-severity": "error",
            "error-path": "Cisco-IOS-XR-um-router-bgp-cfg:router/bgp/as[as-number = '65001']/vrfs/vrf[vrf-name = 'VRF1']/neighbors/neighbor[neighbor-address = '10.1.1.2']/address-families/address-family[af-name = 'ipv4-unicast']/next-hop-self",
            "error-message": "'sysdb' detected the 'warning' condition 'A verifier or EDM callback function returned: 'not found''"
           }
          ]
         }
        }
        
--- FAIL: TestAccDataSourceIosxrRouterBGPVRFNeighborAddressFamily (24.35s)
FAIL
FAIL    github.com/CiscoDevNet/terraform-provider-iosxr/internal/provider       37.337s
FAIL
@danischm
Copy link
Member

Yes, we paused testing against 7.9.2 because there are some open issues wrt models and gNMI. All of the tests should work against 7.6 although this is pretty outdated by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants