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

acceptance tests #9

Merged
merged 7 commits into from
Jun 28, 2022
Merged

acceptance tests #9

merged 7 commits into from
Jun 28, 2022

Conversation

rustiever
Copy link
Contributor

@rustiever rustiever commented Jun 14, 2022

Description

Added acceptance tests
No unit tests are needed since this PR is just refactoring

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • Added unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@rustiever rustiever self-assigned this Jun 14, 2022
is := is.New(t)
client, err := getClient()
is.NoErr(err)
leads, err := addLeads(client, len(records))
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment on lines 70 to 96
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
}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactored

@rustiever rustiever requested a review from hariso June 25, 2022 06:04
@rustiever rustiever merged commit 3b1b22b into main Jun 28, 2022
@rustiever rustiever deleted the accptance-tests branch June 28, 2022 05:57
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