Skip to content

sail: add a staging server for testing SSL#1604

Merged
nicks merged 1 commit into
masterfrom
nicks/ch2495/staging
May 9, 2019
Merged

sail: add a staging server for testing SSL#1604
nicks merged 1 commit into
masterfrom
nicks/ch2495/staging

Conversation

@nicks

@nicks nicks commented May 9, 2019

Copy link
Copy Markdown
Contributor

Hello @maiamcc,

Please review the following commits I made in branch nicks/ch2495/staging:

cb9a7c3 (2019-05-09 16:41:03 -0400)
sail: add a staging server for testing SSL

@nicks
nicks requested a review from maiamcc May 9, 2019 20:41
resp, err := http.Post(u.String(), "text/plain", bytes.NewReader(reqJson))
if err != nil {
return "", "", errors.Wrapf(err, "GET %s", u.String())
return "", "", err

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this wrapper because

  1. This isn't even a GET, so the message was wrong
  2. http.Post errors already include "post [url]", so this led to weird duplication

Comment thread internal/model/sail.go
*m = SailModeStaging
default:
return UnrecognizedWebModeError(v)
return UnrecognizedSailModeError(v)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch 😅

Comment thread internal/model/sail.go Outdated
func UnrecognizedSailModeError(v string) error {
return fmt.Errorf("Unrecognized sail mode: %s. Allowed values: %s", v, []SailMode{
SailModeDefault, SailModeDisabled, SailModeLocal, SailModeProd,
SailModeDefault, SailModeDisabled, SailModeLocal, SailModeProd, SailModeStaging,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: swap Prod and Staging so they're in a reasonable order

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nicks
nicks force-pushed the nicks/ch2495/staging branch from cb9a7c3 to 8d1c47d Compare May 9, 2019 21:47
@nicks
nicks merged commit 1cdca2f into master May 9, 2019
@nicks
nicks deleted the nicks/ch2495/staging branch May 9, 2019 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants