From 43f5b0682134e26570a8de4404941a5fb73c883a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Wed, 29 May 2024 13:10:12 +0200 Subject: [PATCH] Fix test case for cross-ream support --- v8/client/client_integration_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/v8/client/client_integration_test.go b/v8/client/client_integration_test.go index e177716c..b034284a 100644 --- a/v8/client/client_integration_test.go +++ b/v8/client/client_integration_test.go @@ -555,7 +555,11 @@ func TestClient_GetServiceTicket_Trusted_Resource_Domain(t *testing.T) { // There is only trust between parent domain (TEST.GOKRB5) and the service domain (RESDOM.GOKRB5). func TestClient_GetServiceTicket_Trusted_Resource_SubDomain(t *testing.T) { test.Integration(t) - c, _ := config.NewFromString(testdata.KRB5_CONF) + + c, err := config.NewFromString(testdata.KRB5_CONF) + if err != nil { + t.Fatalf("error reading krb5 config: %v\n", err) + } addr := os.Getenv("TEST_KDC_ADDR") if addr == "" { @@ -569,7 +573,7 @@ func TestClient_GetServiceTicket_Trusted_Resource_SubDomain(t *testing.T) { case "SUB.TEST.GOKRB5": c.Realms[i].KDC = []string{addr + ":" + testdata.KDC_PORT_TEST_GOKRB5_SUB} case "RESDOM.GOKRB5": - c.Realms[i].KDC = []string{addr + ":" + testdata.KDC_PORT_TEST_GOKRB5_SUB} + c.Realms[i].KDC = []string{addr + ":" + testdata.KDC_PORT_TEST_GOKRB5_RESDOM} } } @@ -580,7 +584,7 @@ func TestClient_GetServiceTicket_Trusted_Resource_SubDomain(t *testing.T) { c.LibDefaults.DefaultTGSEnctypeIDs = []int32{etypeID.ETypesByName["aes256-cts-hmac-sha1-96"]} cl := client.NewWithPassword("testuser1", "SUB.TEST.GOKRB5", "passwordvalue", c) - err := cl.Login() + err = cl.Login() if err != nil { t.Fatalf("error on login: %v\n", err) }