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

Add tests #12

Open
hasit opened this issue Jun 7, 2017 · 2 comments
Open

Add tests #12

hasit opened this issue Jun 7, 2017 · 2 comments

Comments

@hasit
Copy link
Owner

hasit commented Jun 7, 2017

cc @ross-spencer, @nouney

How do we test an interactive system like this one? Any thoughts?

@ross-spencer
Copy link
Contributor

A lot of the interactivity is provided by https://github.com/hasit/bolter/blob/master/bolter.go#L133 UpdateLoc() and so, my introductions, the queries are built like so:

GET Prime Bucket >> Secondary Bucket >> Tertiary Bucket

REF: https://github.com/kval-access-language/kval-language-specification/blob/master/README.md

Once a query string has been created, we just call:

kval.Query(...)

To handle the navigation in one go. https://github.com/hasit/bolter/blob/master/bolter.go#L166

So, a test centered around that function is important - I can already see a few ways I should have cleaned it up, but yeah, keeping track of the state as we input invalid values, and use it to navigate jumping to and from buckets would be good.

I'm a bit short of time to write something for it now but I can have a look if this hasn't been taken up in a few weeks.

@hasit
Copy link
Owner Author

hasit commented Jun 8, 2017

@ross-spencer

Understood. Another way would be to explicitly write everything to STDOUT and read from there in tests.

I agree that we can clean up the code and gradually bring back some of the old functionalities, i.e. machine friendly output, non-interactive mode. But that is a whole different conversation. I might start an issue with a detailed roadmap of where we could take this going forward.

Also, I will be able to spare either Saturday or Sunday of this week to organize the code following Ben Johnson's Standard Package Layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants