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
cc1ff932
Commit
cc1ff932
authored
Oct 18, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
letsencrypt: Fix Windows tests
parent
42ac2d2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
config/letsencrypt/storage_test.go
config/letsencrypt/storage_test.go
+13
-10
No files found.
config/letsencrypt/storage_test.go
View file @
cc1ff932
package
letsencrypt
import
"testing"
import
(
"path/filepath"
"testing"
)
func
TestStorage
(
t
*
testing
.
T
)
{
storage
=
Storage
(
"./letsencrypt"
)
if
expected
,
actual
:=
"letsencrypt/sites"
,
storage
.
Sites
();
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"sites"
)
,
storage
.
Sites
();
actual
!=
expected
{
t
.
Errorf
(
"Expected Sites() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/sites/test.com"
,
storage
.
Site
(
"test.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"sites"
,
"test.com"
)
,
storage
.
Site
(
"test.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected Site() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/sites/test.com/test.com.crt"
,
storage
.
SiteCertFile
(
"test.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"sites"
,
"test.com"
,
"test.com.crt"
)
,
storage
.
SiteCertFile
(
"test.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected SiteCertFile() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/sites/test.com/test.com.key"
,
storage
.
SiteKeyFile
(
"test.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"sites"
,
"test.com"
,
"test.com.key"
)
,
storage
.
SiteKeyFile
(
"test.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected SiteKeyFile() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/sites/test.com/test.com.json"
,
storage
.
SiteMetaFile
(
"test.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"sites"
,
"test.com"
,
"test.com.json"
)
,
storage
.
SiteMetaFile
(
"test.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected SiteMetaFile() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/users"
,
storage
.
Users
();
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"users"
)
,
storage
.
Users
();
actual
!=
expected
{
t
.
Errorf
(
"Expected Users() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/users/me@example.com"
,
storage
.
User
(
"me@example.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"users"
,
"me@example.com"
)
,
storage
.
User
(
"me@example.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected User() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/users/me@example.com/me.json"
,
storage
.
UserRegFile
(
"me@example.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"users"
,
"me@example.com"
,
"me.json"
)
,
storage
.
UserRegFile
(
"me@example.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected UserRegFile() to return '%s' but got '%s'"
,
expected
,
actual
)
}
if
expected
,
actual
:=
"letsencrypt/users/me@example.com/me.key"
,
storage
.
UserKeyFile
(
"me@example.com"
);
actual
!=
expected
{
if
expected
,
actual
:=
filepath
.
Join
(
"letsencrypt"
,
"users"
,
"me@example.com"
,
"me.key"
)
,
storage
.
UserKeyFile
(
"me@example.com"
);
actual
!=
expected
{
t
.
Errorf
(
"Expected UserKeyFile() to return '%s' but got '%s'"
,
expected
,
actual
)
}
}
...
...
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