Skip to content

Add db open command with Playbook struct #100

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

Merged
merged 7 commits into from
Feb 2, 2020

Conversation

tangrufus
Copy link
Member

@tangrufus tangrufus commented Jan 21, 2020

Continue #72 (which accidentally mereged and then reverted on #90)

Using Playbook struct from #91

See: #7

@tangrufus tangrufus force-pushed the revert-90-revert-72-db-open branch 8 times, most recently from 8965890 to cfde827 Compare February 1, 2020 19:27
@tangrufus tangrufus changed the title [WIP] Add db open command with Playbook struct Add db open command with Playbook struct Feb 1, 2020
@tangrufus tangrufus force-pushed the revert-90-revert-72-db-open branch 2 times, most recently from f2ffae6 to 4fd83f3 Compare February 1, 2020 19:32
@tangrufus tangrufus force-pushed the revert-90-revert-72-db-open branch from 4fd83f3 to 3f32c62 Compare February 1, 2020 19:33
@tangrufus tangrufus marked this pull request as ready for review February 1, 2020 19:35
@tangrufus tangrufus requested a review from swalkinshaw February 1, 2020 19:35
defer trellis.LoadFixtureProject(t)()

ui := cli.NewMockUi()
mockProject := &MockProject{detected: true}
Copy link
Member

Choose a reason for hiding this comment

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

If you're using LoadFixtureProject you shouldn't need a mock project. The standard should work:

project := &trellis.Project{}
trellis := trellis.NewTrellis(project)

That goes for the test below too

open(c DBCredentials) (err error)
}

func (f *DBOpenerFactory) make(app string, ui cli.Ui) (o DBOpener, err error) {
Copy link
Member

Choose a reason for hiding this comment

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

Make

type DBOpenerFactory struct{}

type DBOpener interface {
open(c DBCredentials) (err error)
Copy link
Member

Choose a reason for hiding this comment

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

Open

return nil, fmt.Errorf("%s is not supported", app)
}

func (f *DBOpenerFactory) getSupportedApps() []string {
Copy link
Member

Choose a reason for hiding this comment

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

GetSupportedApps

@tangrufus tangrufus requested a review from swalkinshaw February 2, 2020 15:14
@tangrufus
Copy link
Member Author

All set. Please review.

Copy link
Member

@swalkinshaw swalkinshaw left a comment

Choose a reason for hiding this comment

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

Great work 🎉

@tangrufus tangrufus merged commit c138230 into master Feb 2, 2020
@tangrufus tangrufus deleted the revert-90-revert-72-db-open branch February 2, 2020 19:53
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