awslabs / dynein

DynamoDB CLI written in Rust.
https://github.com/awslabs/dynein
Apache License 2.0
360 stars 37 forks source link

test: add integration tests for use #227

Closed StoneDot closed 4 months ago

StoneDot commented 4 months ago

Issue #, if available:

143

Description of changes: This pull request adds integration tests for use command.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ryota-sakamoto commented 4 months ago

Would you add two aspects of the tests?

StoneDot commented 4 months ago

Thank you for your review.

check that we have two options to specify table name

I infer that you mean that we should check the case where the --table option is not used and the value from config.yml is used. If my understanding is not correct, please let me know.

I will implement tests based on what I understand above.

check stored config file in .dynein dir

I would like to implement this check after #218 is merged because this change potentially conflicts with #218. Thus, I appreciate it if you could review #218 as well.

ryota-sakamoto commented 4 months ago

I mean we can specify table name with two patterns(options or args). In this PR, the args pattern has covered but not the options. https://github.com/awslabs/dynein/blob/54d31f99e16a8da340f28023d2b344ae98adca8c/src/app.rs#L575

StoneDot commented 4 months ago

@ryota-sakamoto I have added the tests for both cases. Could you please check them?