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

feat: Move integration tests to separate package #2111

Merged
merged 25 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0adbd9c
[PoC] Set up integration tests - with setup
sfc-gh-asawicki Oct 10, 2023
3b81572
Move all remaining integration tests
sfc-gh-asawicki Oct 10, 2023
87352f5
Introduce temporary testClient function
sfc-gh-asawicki Oct 10, 2023
de77392
Introduce temporary testContext function
sfc-gh-asawicki Oct 10, 2023
88a47ac
Initialize new sdk client for close test
sfc-gh-asawicki Oct 10, 2023
00f2f16
Fix imports ordering
sfc-gh-asawicki Oct 10, 2023
c31cfbb
Reintroduce context.Background() for helpers
sfc-gh-asawicki Oct 10, 2023
0b2ec2f
Move helpers to integration test package part 1 (WIP)
sfc-gh-asawicki Oct 10, 2023
ace83f5
Use random helper functions from integration tests package
sfc-gh-asawicki Oct 10, 2023
3aff352
Use helper functions from integration tests package (WIP)
sfc-gh-asawicki Oct 10, 2023
9dd31dc
Use helper functions from integration tests package part 2 (WIP)
sfc-gh-asawicki Oct 10, 2023
1e9ef9e
Use helper functions from integration tests package part 3 (WIP)
sfc-gh-asawicki Oct 10, 2023
16de49f
Export utility methods from sdk
sfc-gh-asawicki Oct 10, 2023
c59133b
Use temporarily exported error
sfc-gh-asawicki Oct 10, 2023
26d29ce
Use helper functions from integration tests package part 4 (WIP)
sfc-gh-asawicki Oct 10, 2023
d77bd65
Use helper functions from integration tests package part 5 (WIP)
sfc-gh-asawicki Oct 10, 2023
9ab98e2
Use helper functions from integration tests package part 6 (WIP)
sfc-gh-asawicki Oct 10, 2023
2add145
Use helper functions from integration tests package part 7 (WIP)
sfc-gh-asawicki Oct 10, 2023
1cf3c53
Prune old helper
sfc-gh-asawicki Oct 10, 2023
37b7852
Fix last export problems
sfc-gh-asawicki Oct 10, 2023
4fd8e4f
Fix linters
sfc-gh-asawicki Oct 10, 2023
f817192
Add explanatory comments
sfc-gh-asawicki Oct 11, 2023
652a4b0
Rename package
sfc-gh-asawicki Oct 11, 2023
7a6f781
Merge branch 'main' into move-integration-tests-to-separate-package
sfc-gh-asawicki Oct 11, 2023
e9e6072
Merge branch 'main' into move-integration-tests-to-separate-package
sfc-gh-asawicki Oct 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/sdk/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ type ForeignKeyOnAction struct {
func (row *propertyRow) toBoolProperty() *BoolProperty {
var value bool
if row.Value != "" && row.Value != "null" {
value = toBool(row.Value)
value = ToBool(row.Value)
} else {
value = false
}
var defaultValue bool
if row.DefaultValue != "" && row.Value != "null" {
defaultValue = toBool(row.DefaultValue)
defaultValue = ToBool(row.DefaultValue)
} else {
defaultValue = false
}
Expand Down
85 changes: 0 additions & 85 deletions pkg/sdk/conversion_functions_integration_test.go

This file was deleted.

46 changes: 23 additions & 23 deletions pkg/sdk/external_tables_dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,50 +250,50 @@ func (v TagAssociationRequest) toOpts() TagAssociation {
}
}

func (v *CreateExternalTableRequest) toOpts() *CreateExternalTableOptions {
columns := make([]ExternalTableColumn, len(v.columns))
if v.columns != nil {
for i, c := range v.columns {
func (s *CreateExternalTableRequest) toOpts() *CreateExternalTableOptions {
columns := make([]ExternalTableColumn, len(s.columns))
if s.columns != nil {
for i, c := range s.columns {
columns[i] = c.toOpts()
}
}

var fileFormat []ExternalTableFileFormat
if v.fileFormat != nil {
fileFormat = []ExternalTableFileFormat{v.fileFormat.toOpts()}
if s.fileFormat != nil {
fileFormat = []ExternalTableFileFormat{s.fileFormat.toOpts()}
}

var cloudProviderParams *CloudProviderParams
if v.cloudProviderParams != nil {
cloudProviderParams = v.cloudProviderParams.toOpts()
if s.cloudProviderParams != nil {
cloudProviderParams = s.cloudProviderParams.toOpts()
}

var rowAccessPolicy *RowAccessPolicy
if v.rowAccessPolicy != nil {
rowAccessPolicy = v.rowAccessPolicy.toOpts()
if s.rowAccessPolicy != nil {
rowAccessPolicy = s.rowAccessPolicy.toOpts()
}

tag := make([]TagAssociation, len(v.tag))
if v.tag != nil {
for i, t := range v.tag {
tag := make([]TagAssociation, len(s.tag))
if s.tag != nil {
for i, t := range s.tag {
tag[i] = t.toOpts()
}
}

return &CreateExternalTableOptions{
OrReplace: v.orReplace,
IfNotExists: v.ifNotExists,
name: v.name,
OrReplace: s.orReplace,
IfNotExists: s.ifNotExists,
name: s.name,
Columns: columns,
CloudProviderParams: cloudProviderParams,
Location: v.location,
RefreshOnCreate: v.refreshOnCreate,
AutoRefresh: v.autoRefresh,
Pattern: v.pattern,
Location: s.location,
RefreshOnCreate: s.refreshOnCreate,
AutoRefresh: s.autoRefresh,
Pattern: s.pattern,
FileFormat: fileFormat,
AwsSnsTopic: v.awsSnsTopic,
CopyGrants: v.copyGrants,
Comment: v.comment,
AwsSnsTopic: s.awsSnsTopic,
CopyGrants: s.copyGrants,
Comment: s.comment,
RowAccessPolicy: rowAccessPolicy,
Tag: tag,
}
Expand Down
Loading
Loading