Skip to content

Commit

Permalink
Skip failing IPv6 tests in CI (#1342)
Browse files Browse the repository at this point in the history
These tests have been failing on the `test` pipeline CI for a while, but they run fine locally on the systems that support ipv4 and ipv6

since we have `test-ipv6` pipeline that runs full test suite in a docker image with IPv6 enabled,
we should be okay to skip these Tests on the `test` pipeline.

The reason these tests are failing is because they are using `net.Listen("tcp", "localhost:0")`,
the use of `tcp` network expects both IPv4 and IPv6.

Signed-off-by: Suraj Nath <[email protected]>
  • Loading branch information
electron0zero authored Dec 30, 2024
1 parent 89a9da4 commit 0f7025f
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions prober/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ import (
)

func TestGRPCConnection(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

ln, err := net.Listen("tcp", "localhost:0")
if err != nil {
Expand Down Expand Up @@ -100,6 +103,9 @@ func TestGRPCConnection(t *testing.T) {
}

func TestMultipleGRPCservices(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

ln, err := net.Listen("tcp", "localhost:0")
if err != nil {
Expand Down Expand Up @@ -166,6 +172,9 @@ func TestMultipleGRPCservices(t *testing.T) {
}

func TestGRPCTLSConnection(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

certExpiry := time.Now().AddDate(0, 0, 1)
testCertTmpl := generateCertificateTemplate(certExpiry, false)
Expand Down Expand Up @@ -258,6 +267,9 @@ func TestGRPCTLSConnection(t *testing.T) {
}

func TestNoTLSConnection(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

ln, err := net.Listen("tcp", "localhost:0")
if err != nil {
Expand Down Expand Up @@ -305,14 +317,17 @@ func TestNoTLSConnection(t *testing.T) {

expectedResults := map[string]float64{
"probe_grpc_ssl": 0,
"probe_grpc_status_code": 14, //UNAVAILABLE
"probe_grpc_status_code": 14, // UNAVAILABLE
}

checkRegistryResults(expectedResults, mfs, t)

}

func TestGRPCServiceNotFound(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

ln, err := net.Listen("tcp", "localhost:0")
if err != nil {
Expand Down Expand Up @@ -359,13 +374,16 @@ func TestGRPCServiceNotFound(t *testing.T) {

expectedResults := map[string]float64{
"probe_grpc_ssl": 0,
"probe_grpc_status_code": 5, //NOT_FOUND
"probe_grpc_status_code": 5, // NOT_FOUND
}

checkRegistryResults(expectedResults, mfs, t)
}

func TestGRPCHealthCheckUnimplemented(t *testing.T) {
if os.Getenv("CI") == "true" {
t.Skip("skipping; CI is failing on ipv6 dns requests")
}

ln, err := net.Listen("tcp", "localhost:0")
if err != nil {
Expand Down Expand Up @@ -409,7 +427,7 @@ func TestGRPCHealthCheckUnimplemented(t *testing.T) {

expectedResults := map[string]float64{
"probe_grpc_ssl": 0,
"probe_grpc_status_code": 12, //UNIMPLEMENTED
"probe_grpc_status_code": 12, // UNIMPLEMENTED
}

checkRegistryResults(expectedResults, mfs, t)
Expand Down

0 comments on commit 0f7025f

Please sign in to comment.