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

Use database command #110

Merged
merged 27 commits into from Oct 19, 2020
Merged

Use database command #110

merged 27 commits into from Oct 19, 2020

Conversation

srafi1
Copy link
Contributor

@srafi1 srafi1 commented Oct 18, 2020

Adds the use <database> command to switch branches. Fetches a remote branch if it is not locally available.

Closes #107

Copy link
Owner

@filhodanuvem filhodanuvem left a comment

Choose a reason for hiding this comment

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

Awesome work @srafi1 .
I'm trying to start creating functional tests. Tests where we run gitql enterily and try to check if the command has failed or printed the expected output.

I would appreciate if you create a new file called use.bats as I did at this example . Two tests would be expected, first one is just to check that the exit code is zero (exactly what I did in the example ) when we run gitql "use master". Another one checking the failure case, the exit code should not be zero if we try to switch to a not existent branch.

@srafi1
Copy link
Contributor Author

srafi1 commented Oct 19, 2020

Thanks @filhodanuvem! It took a few tries to get bats working properly because use master changes the branch (which removes the tests in the process), but I think I got it done correctly.

@filhodanuvem
Copy link
Owner

🤣 that's funny and sad at the same time. Thank you for the effort!

@filhodanuvem filhodanuvem merged commit dddbec9 into filhodanuvem:master Oct 19, 2020
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.

"Use" feature
2 participants