Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

chore: add auth init to unit tests #280

Merged
merged 6 commits into from
Mar 10, 2021
Merged

chore: add auth init to unit tests #280

merged 6 commits into from
Mar 10, 2021

Conversation

cmoog
Copy link
Contributor

@cmoog cmoog commented Mar 10, 2021

No description provided.

Comment on lines +34 to +37
email := os.Getenv("CODER_EMAIL")
password := os.Getenv("CODER_PASSWORD")
rawURL := os.Getenv("CODER_URL")
if email == "" || password == "" || rawURL == "" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jawnsy strong feelings on this vs. flags?

Copy link
Contributor

Choose a reason for hiding this comment

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

I personally prefer flags, but whatever works I guess. The exception would be if these are standard variables that contain credentials (e.g. like KUBECONFIG) that we expect people to set, or that may be injected via the platform (e.g. if we inject tokens automatically into workspaces, so that coder-cli works out-of-the-box and is authenticated with the "owner" user credentials)

@cmoog cmoog merged commit dc44262 into master Mar 10, 2021
@cmoog cmoog deleted the cmoog/test-authed branch March 10, 2021 22:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants