- Notifications
You must be signed in to change notification settings - Fork18
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Really like the direction here. Looks like a good start for an integration testing framework.
} | ||
// HostRunner executes command tests on the host, outside of a container | ||
type HostRunner struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do you foresee us usingHostRunner
in the coder-cli tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not at the moment, but I do think it has a place intcli
as an escape hatch.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Previous comments were very minor.
Uh oh!
There was an error while loading.Please reload this page.
Progress towards#63https://github.com/cdr/enterprise/issues/4230
This PR introduces a new CLI testing framework modeled afterhttps://github.com/cdr/hat.
The tentative name is
tcli
. Commands are executed inside docker containers to limit pollution of the host filesystem and to promote reproducibility.tcli
uses a flexible and extensibleAssertion
API for asserting properties about theCommandResult
.View a sample usage of
tcli
hereGiven that
coder login
currently requires a browser, this PR uses a workaround approach by which asession_token
is acquired through a manual call to the/auth/basic/login
endpoint. The test then injects the credentials into their respective configuration files within the given container manually.