Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
362ead27
Commit
362ead27
authored
Oct 27, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor test improvements
parent
a6ea1e6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
caddy/assets/path_test.go
caddy/assets/path_test.go
+12
-0
caddy/letsencrypt/crypto_test.go
caddy/letsencrypt/crypto_test.go
+2
-2
No files found.
caddy/assets/path_test.go
0 → 100644
View file @
362ead27
package
assets
import
(
"strings"
"testing"
)
func
TestPath
(
t
*
testing
.
T
)
{
if
actual
:=
Path
();
!
strings
.
HasSuffix
(
actual
,
".caddy"
)
{
t
.
Errorf
(
"Expected path to be a .caddy folder, got: %v"
,
actual
)
}
}
caddy/letsencrypt/crypto_test.go
View file @
362ead27
...
@@ -10,14 +10,14 @@ import (
...
@@ -10,14 +10,14 @@ import (
)
)
func
init
()
{
func
init
()
{
rsaKeySizeToUse
=
128
// make
s tests faster
rsaKeySizeToUse
=
128
// make
tests faster; small key size OK for testing
}
}
func
TestSaveAndLoadRSAPrivateKey
(
t
*
testing
.
T
)
{
func
TestSaveAndLoadRSAPrivateKey
(
t
*
testing
.
T
)
{
keyFile
:=
"test.key"
keyFile
:=
"test.key"
defer
os
.
Remove
(
keyFile
)
defer
os
.
Remove
(
keyFile
)
privateKey
,
err
:=
rsa
.
GenerateKey
(
rand
.
Reader
,
128
)
// small key size is OK for testing
privateKey
,
err
:=
rsa
.
GenerateKey
(
rand
.
Reader
,
rsaKeySizeToUse
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment