Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Spelling Mistakes #177

Merged
merged 1 commit into from
Jan 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func TestNewDefaultConfig(t *testing.T) {
if config := newDefaultConfig(); config == nil {
t.Error("we should have recieved a config")
t.Error("we should have received a config")
}
}

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ type Config struct {
// Store is a url for a store resource, used to hold the refresh tokens
StoreURL string `json:"store-url" yaml:"store-url" usage:"url for the storage subsystem, e.g redis://127.0.0.1:6379, file:///etc/tokens.file"`
// EncryptionKey is the encryption key used to encrypt the refresh token
EncryptionKey string `json:"encryption-key" yaml:"encryption-key" usage:"encryption key used to encrpytion the session state"`
EncryptionKey string `json:"encryption-key" yaml:"encryption-key" usage:"encryption key used to encryption the session state"`

// LogRequests indicates if we should log all the requests
LogRequests bool `json:"log-requests" yaml:"log-requests" usage:"enable http logging of the requests"`
Expand Down
4 changes: 2 additions & 2 deletions handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestExpirationHandler(t *testing.T) {
// step: if closure so we need to get the handler each time
proxy.expirationHandler(cx)
// step: check the content result
assert.Equal(t, c.HTTPCode, cx.Writer.Status(), "test case %d should have recieved: %d, but got %d", i,
assert.Equal(t, c.HTTPCode, cx.Writer.Status(), "test case %d should have received: %d, but got %d", i,
c.HTTPCode, cx.Writer.Status())
}
}
Expand Down Expand Up @@ -326,7 +326,7 @@ func TestCallbackURL(t *testing.T) {
continue
}
callbackURL := resp.Header.Get("Location")
if !assert.NotEmpty(t, callbackURL, "case %d, should have recieved a callback url", i) {
if !assert.NotEmpty(t, callbackURL, "case %d, should have received a callback url", i) {
continue
}
// step: call the callback url
Expand Down
4 changes: 2 additions & 2 deletions middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func TestAdmissionHandlerRoles(t *testing.T) {

handler(c.Context)
status := c.Context.Writer.Status()
assert.Equal(t, c.HTTPCode, status, "test case %d should have recieved code: %d, got %d", i, c.HTTPCode, status)
assert.Equal(t, c.HTTPCode, status, "test case %d should have received code: %d, got %d", i, c.HTTPCode, status)
}
}

Expand Down Expand Up @@ -598,6 +598,6 @@ func TestAdmissionHandlerClaims(t *testing.T) {
handler(c.Context)
c.Context.Writer.WriteHeaderNow()
status := c.Context.Writer.Status()
assert.Equal(t, c.HTTPCode, status, "test case %d should have recieved code: %d, got %d", i, c.HTTPCode, status)
assert.Equal(t, c.HTTPCode, status, "test case %d should have received code: %d, got %d", i, c.HTTPCode, status)
}
}
6 changes: 3 additions & 3 deletions misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestRedirectURL(t *testing.T) {
p, _, _ := newTestProxyService(nil)

if p.redirectToURL("http://127.0.0.1", context); context.Writer.Status() != http.StatusTemporaryRedirect {
t.Error("we should have recieved a redirect")
t.Error("we should have received a redirect")
}

if !context.IsAborted() {
Expand All @@ -69,11 +69,11 @@ func TestAccessForbidden(t *testing.T) {

p.config.SkipTokenVerification = false
if p.accessForbidden(context); context.Writer.Status() != http.StatusForbidden {
t.Error("we should have recieved a forbidden access")
t.Error("we should have received a forbidden access")
}

p.config.SkipTokenVerification = true
if p.accessForbidden(context); context.Writer.Status() != http.StatusForbidden {
t.Error("we should have recieved a forbidden access")
t.Error("we should have received a forbidden access")
}
}
2 changes: 1 addition & 1 deletion resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (r *Resource) parse(resource string) (*Resource, error) {
case "white-listed":
value, err := strconv.ParseBool(kp[1])
if err != nil {
return nil, errors.New("the value of whitelisted must be true|TRUE|T or it's false equivilant")
return nil, errors.New("the value of whitelisted must be true|TRUE|T or it's false equivalent")
}
r.WhiteListed = value
default:
Expand Down
2 changes: 1 addition & 1 deletion resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestResourceString(t *testing.T) {
Roles: []string{"1", "2", "3"},
}
if s := resource.String(); s == "" {
t.Error("we should have recieved a string")
t.Error("we should have received a string")
}
}

Expand Down
2 changes: 1 addition & 1 deletion user_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestGetUserRoles(t *testing.T) {
t.Error("we should have received a true resposne")
}
if user.getRoles() == "nothing" {
t.Error("we should have recieved a false response")
t.Error("we should have received a false response")
}
}

Expand Down