Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Initial setup for integration tests#80

Merged
cmoog merged 19 commits intomasterfromintegration-tests
Jul 29, 2020
Merged

Conversation

cmoog
Copy link
Contributor

@cmoogcmoog commentedJul 28, 2020
edited
Loading

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 istcli. 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 oftclihere

Given thatcoder 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.

@cmoogcmoog marked this pull request as ready for reviewJuly 28, 2020 19:59
@cmoogcmoog requested a review fromnhooyrJuly 28, 2020 19:59
@cmoog
Copy link
ContributorAuthor

This is ready to merge.

Copy link
Contributor

@scsmithrscsmithr left a 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{}
Copy link
Contributor

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?

Copy link
ContributorAuthor

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.

Copy link
Contributor

@scsmithrscsmithr left a 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.

@cmoogcmoog merged commit433da04 intomasterJul 29, 2020
@cmoogcmoog deleted the integration-tests branchJuly 29, 2020 18:54
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@scsmithrscsmithrscsmithr approved these changes

@nhooyrnhooyrAwaiting requested review from nhooyr

@coadlercoadlerAwaiting requested review from coadler

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@cmoog@scsmithr

[8]ページ先頭

©2009-2025 Movatter.jp