Skip to content

test: Add more cmd tests#1696

Merged
yevgenypats merged 1 commit intofeat/cloudquery-cli-v2from
test/cmd_tests
Sep 1, 2022
Merged

test: Add more cmd tests#1696
yevgenypats merged 1 commit intofeat/cloudquery-cli-v2from
test/cmd_tests

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

Summary

Adding more tests. and also moving cmd tests to run via rootCmd so we can get full coverage and know that the basic commands are working.


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Test locally on your own infrastructure
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@yevgenypats yevgenypats requested review from a team, amanenk and hermanschaaf and removed request for a team and amanenk September 1, 2022 12:06
@yevgenypats yevgenypats changed the base branch from main to feat/cloudquery-cli-v2 September 1, 2022 12:08
@yevgenypats yevgenypats changed the title Test/cmd tests test: Add more cmd tests Sep 1, 2022
}
defer os.RemoveAll(tmpdir)
cmd := newCmdRoot()
cmd.SetArgs([]string{"doc", tmpdir})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't know about the doc command, should it be listed in the list of available commands?

Usage:
  cloudquery [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  generate    Generate initial config file for source and destination plugins
  sync        Sync resources from configured source plugins to destination

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it shouldn't because it's mainly for our website. I don't see a user using this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah me neither... but in that case we should probably find a better way of generating the files for the website, no need to ship it with our cli.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(not a priority, just a side comment)

@yevgenypats yevgenypats merged commit de3efc6 into feat/cloudquery-cli-v2 Sep 1, 2022
@yevgenypats yevgenypats deleted the test/cmd_tests branch September 1, 2022 12:15
yevgenypats added a commit that referenced this pull request Sep 6, 2022
test: Add more tests to cli
yevgenypats added a commit that referenced this pull request Sep 6, 2022
* feat!: CloudQuery V2.

goes together with cloudquery/plugin-sdk#4

This is V2 of CloudQuery CLI together with the new https://github.com/cloudquery/plugin-sdk

- Support for multiple databases. plugins are sending info back to CLI
- seperate CLI configuration from plugins configuration.

- Moved to plain gRPC (no more go-plugin)
- zerolog everwhere

- no custom UI implementations
- no bloated/unneeded abstraction layers

Issues that should be fixed:

#1104
#1055
#983
#859
#858
#888
#857
#854
#904
#751
#539
#392
#292
#159
#908
#840

* migrate gcp to new sdk

* work on a new abstraction layer for codegen

* re-implement cq-gen

* Add autogenerated mock tests

* auto generated compute service

* working compute service

* regenerated gcp with compute with primary key

* Add automigrate to postgresql-dest

* small logging fix

* improve pg tests

* more work

* pg storage working with upsert

* wip

* Compiled resources

* autogenerated test passing

* remove old gcp services

* remove more old services

* migrate more gcp services

* PostgreSQL fixes

* fix pg migration

* working on more tests

* remove old gcp workflows

* more tests

* Adding more tests

* rebase more or less worked

* remove replace directive

* more go lint fixes

* update plugin-sdk

* make gcp compile

* fix more linters

* fix race condition bug with plugin hanging

* bugfix in community plugins

* fix plugin tests

* fix: Show help on parsing errors

* fix review

* feat: Remove unique from PostgreSQL destination

* remove the need for deprecated errors package

* feat: Write to config file instead of stdout (v2) (#1645)

* feat: Write to config file instead of stdout

* Update SDK to v0.0.10 and remove unique constraints

* Add more assertions to generate test

* Write to stdout

* clarify if statement

* fix: pgx_log_level not mandatory

* feat: Add errors/warnings summary

* test: Add more cmd tests (#1696)

test: Add more tests to cli

* chore: Remove old test file

* feat: Add example of list/detail codegen (#1706)

* feat: Add example of list/detail codegen

* make naming more reasonable

* finalizing gcp

* finalize gcp migration

* feat: New go sdk for gcp (#1720)

* update to latest sdk

* feat: Move to new SDK

* more fixes to autogeneration

* more fixes to gcp

* feat: Add sentry

* remove old faker

* go mod tidy

* fix cli tests

Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
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