Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
docs: Comments for IgnoreInTests (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
shimonp21 authored Apr 20, 2022
1 parent f1efd02 commit c979e1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions provider/schema/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ type Column struct {
IgnoreError IgnoreErrorFunc
// Creation options allow modifying how column is defined when table is created
CreationOptions ColumnCreationOptions
// IgnoreInTests if true this skips this column in tests as sometimes it might be hard
// to create a reproducible test environment with this column being non nill. For example various error columns and so on

// IgnoreInTests is used to skip verifying the column is non-nil in integration tests.
// By default, integration tests perform a fetch for all resources in cloudquery's test account, and
// verify all columns are non-nil.
// If IgnoreInTests is true, verification is skipped for this column.
// Used when it is hard to create a reproducible environment with this column being non-nil (e.g. various error columns).
IgnoreInTests bool

// internal is true if this column is managed by the SDK
Expand Down
9 changes: 6 additions & 3 deletions provider/schema/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ type Table struct {
// AlwaysDelete will always delete table data on fetch regardless if delete is disabled on run,
// use this only in specific cases, if you are unsure contact the CloudQuery Team.
AlwaysDelete bool
// IgnoreInTests if true this skips this column in tests as sometimes it might be hard
// to create a reproducible test environment with this column being non nil. For example various error tables such as
// security violations and so.

// IgnoreInTests is used to exclude a table from integration tests.
// By default, integration tests fetch all resources from cloudquery's test account, and verifY all tables
// have at least one row.
// When IgnoreInTests is true, integration tests won't fetch from this table.
// Used when it is hard to create a reproducible environment with a row in this table.
IgnoreInTests bool
// Global tables are usually the same regardless of the provider fetch configuration. Global table data gets fetched
// and doesn't produce PK conflict errors instead data is replaced
Expand Down

0 comments on commit c979e1d

Please sign in to comment.