-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add tests for cloud ints #32
Conversation
Co-Authored-By: Jiri Kuncar <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…og-api-client-go into ricky/add_cloud_ints_tests
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Thanks for this. Left some comments but should be good after that.
Mostly
- Lets check for errors + httpResp codes anytime we call an endpoint
- We should defer the uninstallation of any updated accounts being created
- Lets use the account variables in the assertions being done instead of the hardcoded values.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
1 similar comment
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
|
||
var UNIQUEACCOUNTID = fmt.Sprintf("12345%s", time.Now()) | ||
|
||
var TESTAWSACCLOGS = datadog.AwsAccount{ |
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.
we should create a factory function so each testcase creates it's unique AwsAccount
, AwsAccountAndLambdaInput
and AwsLogsServicesInput
.
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.
Good call, I added a quick commit to add this. (talked to @Ricky-Thomas offline)
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM
list_output_2, _, _ := TESTAPICLIENT.AWSLogsIntegrationApi.AWSLogsList(TESTAUTH) | ||
|
||
var list_of_arns_2 []datadog.AwsLogsListOutputLambdas | ||
x = false |
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.
x = false | |
existsAfterDelete = false |
} | ||
} | ||
// Check that ARN no longer exists after delete | ||
assert.Assert(t, x != true) |
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.
assert.Assert(t, x != true) | |
assert.Assert(t, !existsAfterDelete) |
Required test suite for generate Go client.
Also randomized certain credentials in each test file to ensure test idempotency.