Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Email-Id and Access-Token Headers for authentication #15

Merged
merged 1 commit into from
Oct 3, 2018
Merged

Add Email-Id and Access-Token Headers for authentication #15

merged 1 commit into from
Oct 3, 2018

Conversation

achilles42
Copy link
Contributor

No description provided.

cmd/procs/description/descriptor_test.go Outdated Show resolved Hide resolved
cmd/procs/execution/executioner.go Outdated Show resolved Hide resolved
cmd/procs/execution/executioner.go Outdated Show resolved Hide resolved
cmd/procs/execution/executioner_test.go Outdated Show resolved Hide resolved
cmd/procs/list/lister.go Outdated Show resolved Hide resolved
config/config_test.go Show resolved Hide resolved
config/config_test.go Show resolved Hide resolved
config/config_test.go Outdated Show resolved Hide resolved
daemon/client_test.go Outdated Show resolved Hide resolved
daemon/client_test.go Outdated Show resolved Hide resolved
@achilles42 achilles42 changed the base branch from add-auth-headers to master October 1, 2018 11:18
@@ -18,7 +20,12 @@ func NewCmd(printer io.Printer, proctorEngineClient daemon.Client) *cobra.Comman
Run: func(cmd *cobra.Command, args []string) {
procList, err := proctorEngineClient.ListProcs()
if err != nil {
printer.Println("Error fetching list of procs. Please check configuration and network connectivity", color.FgRed)
if err.Error() == http.StatusText(http.StatusUnauthorized) {
printer.Println(http.StatusText(http.StatusUnauthorized), color.FgRed)
Copy link
Member

Choose a reason for hiding this comment

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

Please display descriptive unauthorized error to user.

config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
daemon/client_test.go Show resolved Hide resolved

executeProcResponse, err := proctorClient.ExecuteProc(procName, procArgs)

assert.Nil(t, err)
Copy link
Member

Choose a reason for hiding this comment

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

Error shouldn't be nil on sad-case scenarios.

daemon/client.go Outdated Show resolved Hide resolved
daemon/client_test.go Outdated Show resolved Hide resolved
Resolves #18
1. Constantized all the common error messages printed out to user
2. Refactored tests to use constants
3. Fixes in travis.yml to use updated package names, verbose output for debugging
4. Introduces Email and Access token, checking for same in http headers Email-Id and Access-Token
5. Fixes in error output via websocket, printing new line at end of output so that follow up messages to console don't have to do it
6. Introduces environment config ENVIRONMENT to enable testing of configs
7. HTTP testing library httpmock
@olttwa olttwa merged commit 46846db into gojek:master Oct 3, 2018
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