nmstate / kubernetes-nmstate

Declarative node network configuration driven through Kubernetes API.
GNU General Public License v2.0
181 stars 89 forks source link

test: add test for global DNS configuration #1226

Closed mkowalski closed 1 month ago

mkowalski commented 8 months ago

Is this a BUG FIX or a FEATURE ?:

/kind enhancement

What this PR does / why we need it:

Special notes for your reviewer:

Release note:

NONE
mkowalski commented 8 months ago

/test pull-kubernetes-nmstate-unit-test

It may be a valid issue

 /home/prow/go/pkg/mod/github.com/golangci/golangci-lint@v1.55.2/pkg/golinters/musttag.go:4:2: unrecognized import path "go.tmz.dev/musttag": reading https://go.tmz.dev/musttag?go-get=1: 404 Not Found 
mkowalski commented 8 months ago

But those servers are good, so they will not trigger the revert. If I read the current code correctly, we want the test to contain hardcoded wrong DNS server, that's why I used 192.168.100.3

mkowalski commented 8 months ago

/retest

mkowalski commented 8 months ago

/test pull-kubernetes-nmstate-unit-test

mkowalski commented 8 months ago

/retest

mkowalski commented 8 months ago

/hold

This test is expected to fail until we have NM fixed. Currently it configures 192.168.100.3 (fake) and never rolls it back

Handler E2E Test Suite: [It] rollback when name servers (configured globally) are wrong after state configuration should rollback to previous name servers expand_less  14m8s
{Timed out after 480.000s.
should eventually lose wrong name server
Expected
    <[]string | len:1, cap:1>: ["192.168.100.3"]
not to contain element matching
    <string>: 192.168.100.3 failed [FAILED] Timed out after 480.000s.
should eventually lose wrong name server
Expected
    <[]string | len:1, cap:1>: ["192.168.100.3"]
not to contain element matching
    <string>: 192.168.100.3
In [It] at: /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/rollback_test.go:262 @ 02/03/24 21:59:26.922
}
mkowalski commented 7 months ago

/retest

mkowalski commented 7 months ago

/retest

go: downloading golang.org/x/mod v0.4.2
/home/prow/go/pkg/mod/k8s.io/apimachinery@v0.23.0/pkg/api/resource/amount.go:23:2: unrecognized import path "gopkg.in/inf.v0": reading https://gopkg.in/inf.v0?go-get=1: 502 Bad Gateway
    server response: Cannot obtain refs from GitHub: timeout
/home/prow/go/pkg/mod/sigs.k8s.io/structured-merge-diff/v4@v4.1.2/value/value.go:26:2: unrecognized import path "gopkg.in/yaml.v2": reading https://gopkg.in/yaml.v2?go-get=1: 502 Bad Gateway
    server response: Cannot obtain refs from GitHub: timeout
/home/prow/go/pkg/mod/sigs.k8s.io/controller-tools@v0.8.0/pkg/schemapatcher/gen.go:24:2: unrecognized import path "gopkg.in/yaml.v3": reading https://gopkg.in/yaml.v3?go-get=1: 502 Bad Gateway
    server response: Cannot obtain refs from GitHub: timeout
make: *** [Makefile:134: gen-k8s] Error 1
mkowalski commented 7 months ago

/retest

qinqon commented 7 months ago

/retest

qinqon commented 7 months ago

/lgtm /approve

kubevirt-bot commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/nmstate/kubernetes-nmstate/blob/main/OWNERS)~~ [qinqon] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mkowalski commented 2 months ago

/retest

mkowalski commented 1 month ago

/hold cancel

That should actually work