threefoldtech / terraform-provider-grid

Apache License 2.0
8 stars 5 forks source link

gateway_fqdn nightly test fails #793

Closed khaledyoussef24 closed 10 months ago

khaledyoussef24 commented 11 months ago

Description

gateway fqdn test in nightly git hub actions fails

TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │ Error: couldn't deploy fqdn gateway with error: error waiting deployment: workload test within deployment 47264 failed with error: failed to setup fqdn proxy: failed to verify domain dns record: host doesn't point to the gateway ip
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │ 
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │   with grid_fqdn_proxy.p1,
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │   on main.tf line 67, in resource "grid_fqdn_proxy" "p1":
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │   67: resource "grid_fqdn_proxy" "p1" {
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: │ 
TestGateWay/gateway_fqdn 2023-11-16T00:59:06Z logger.go:66: ╵
Eslam-Nawara commented 10 months ago

Work completed:

The problem was that the test used a scheduler to find a gateway node, but the fqdn was in a specific node (node 11) so any time the scheduler chose another node, the test fails, so the test is updated now to use node 11 and now it pass

The test only works in devent and is skipped in the other networks

devnet

--- PASS: TestGateWay (83.75s)
    --- PASS: TestGateWay/gateway_fqdn (83.74s)
PASS
ok      github.com/threefoldtech/terraform-provider-grid/integrationtests       83.815s

Mainnet

➜  terraform-provider-grid git:(fix-gateway_fqdn-nightly-test) ✗ export NETWORK="main"
➜  terraform-provider-grid git:(fix-gateway_fqdn-nightly-test) ✗ go test -v ./integrationtests -run TestGateWay/gateway_fqdn
=== RUN   TestGateWay
=== RUN   TestGateWay/gateway_fqdn
    gateway_test.go:86:
--- PASS: TestGateWay (0.01s)
    --- SKIP: TestGateWay/gateway_fqdn (0.00s)
PASS
ok      github.com/threefoldtech/terraform-provider-grid/integrationtests       0.076s
rawdaGastan commented 10 months ago

Verified and worked.

Skipped in: [qa, test, main]

=== RUN   TestGateWay/gateway_fqdn
    gateway_test.go:88: 
--- PASS: TestGateWay (84.91s)
    --- SKIP: TestGateWay/gateway_fqdn (0.00s)