-
Notifications
You must be signed in to change notification settings - Fork 0
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
acceptance tests #9
Conversation
582fdd5
to
6168a4d
Compare
source/acceptance_test.go
Outdated
is := is.New(t) | ||
client, err := getClient() | ||
is.NoErr(err) | ||
leads, err := addLeads(client, len(records)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since client
is a test client, it looks like you can move addLeads()
to Client
. That would make the namespace a bit cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
source/acceptance_test.go
Outdated
type AcceptanceTestDriver struct { | ||
Config AcceptanceSourceTestDriverConfig | ||
sdk.ConfigurableAcceptanceTestDriver | ||
} | ||
|
||
// AcceptanceSourceTestDriverConfig contains the configuration for | ||
// AcceptanceTestDriver. | ||
type AcceptanceSourceTestDriverConfig struct { | ||
// Connector is the connector to be tested. | ||
Connector sdk.Connector | ||
|
||
// SourceConfig should be a valid config for a source connector, reading | ||
// from the same location as the destination will write to. | ||
SourceConfig map[string]string | ||
// DestinationConfig should be a valid config for a destination connector, | ||
// writing to the same location as the source will read from. | ||
DestinationConfig map[string]string | ||
|
||
// BeforeTest is executed before each acceptance test. | ||
BeforeTest func(t *testing.T) | ||
// AfterTest is executed after each acceptance test. | ||
AfterTest func(t *testing.T) | ||
|
||
// GoleakOptions will be applied to goleak.VerifyNone. Can be used to | ||
// suppress false positive goroutine leaks. | ||
GoleakOptions []goleak.Option | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rustiever Sorry for the late response! I'd be grateful if you could remind what was the error you had, which forced you to embed sdk.ConfigurableAcceptanceTestDriver
but also copy paste the fields and methods. Other than this, I see no blockers to merging this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored
Description
Added acceptance tests
No unit tests are needed since this PR is just refactoring
Quick checks: