Explorar o código

Fix tests for root not found by fingerprint functionality

Broken test was merged as part of https://github.com/smallstep/certificates/pull/1893.
Herman Slatman hai 11 meses
pai
achega
979edbb591
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      api/api_test.go
  2. 1 1
      ca/ca_test.go

+ 1 - 1
api/api_test.go

@@ -860,7 +860,7 @@ func Test_Root(t *testing.T) {
 		statusCode  int
 	}{
 		{"ok", parseCertificate(rootPEM), nil, "", 200},
-		{"fail", nil, fmt.Errorf("not found"), fmt.Sprintf("root certificate with fingerprint %q was not found", sha), 404},
+		{"fail", nil, fmt.Errorf("not found"), fmt.Sprintf(`root certificate with fingerprint \"%s\" was not found`, sha), 404},
 	}
 
 	// Request with chi context

+ 1 - 1
ca/ca_test.go

@@ -482,7 +482,7 @@ func TestCARoot(t *testing.T) {
 				ca:     ca,
 				sha:    "foo",
 				status: http.StatusNotFound,
-				errMsg: errs.NotFoundDefaultMsg,
+				errMsg: `root certificate with fingerprint "foo" was not found`,
 			}
 		},
 		"success": func(t *testing.T) *rootTest {