Skip to content

Commit d35848f

Browse files
committed
Fix unit tests.
1 parent c3f98fd commit d35848f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

authority/tls_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ func TestAuthority_Sign(t *testing.T) {
310310
extraOpts: extraOpts,
311311
signOpts: _signOpts,
312312
err: errors.New("requested duration of 25h0m0s is more than the authorized maximum certificate duration of 24h1m0s"),
313-
code: http.StatusBadRequest,
313+
code: http.StatusForbidden,
314314
}
315315
},
316316
"fail validate sans when adding common name not in claims": func(t *testing.T) *signTest {
@@ -323,7 +323,7 @@ func TestAuthority_Sign(t *testing.T) {
323323
extraOpts: extraOpts,
324324
signOpts: signOpts,
325325
err: errors.New("certificate request does not contain the valid DNS names - got [test.smallstep.com smallstep test], want [test.smallstep.com]"),
326-
code: http.StatusBadRequest,
326+
code: http.StatusForbidden,
327327
}
328328
},
329329
"fail rsa key too short": func(t *testing.T) *signTest {

ca/ca_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ ZEp7knvU2psWRw==
200200
return &signTest{
201201
ca: ca,
202202
body: string(body),
203-
status: http.StatusBadRequest,
204-
errMsg: errs.BadRequestPrefix,
203+
status: http.StatusForbidden,
204+
errMsg: errs.ForbiddenPrefix,
205205
}
206206
},
207207
"ok": func(t *testing.T) *signTest {

0 commit comments

Comments
 (0)