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

Add Jobs endpoint tests #365

Merged
merged 1 commit into from
Sep 19, 2019
Merged

Add Jobs endpoint tests #365

merged 1 commit into from
Sep 19, 2019

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Sep 17, 2019

Changes

Add tests for the Management API Jobs endpoint . This SDK does not yet cover all Jobs endpoints, hence the limited tests.

References

Tests for #354

Testing

  • This change adds integration and mock test coverage

@joshcanhelp joshcanhelp changed the title Add jobs tests Add Jobs endpoint tests Sep 17, 2019
@joshcanhelp joshcanhelp marked this pull request as ready for review September 18, 2019 20:43
@joshcanhelp joshcanhelp requested a review from a team September 18, 2019 20:43
$headers = $api->getHistoryHeaders();
$this->assertEquals( 'Bearer __api_token__', $headers['Authorization'][0] );
$this->assertEquals( self::$expectedTelemetry, $headers['Auth0-Client'][0] );
$this->assertStringStartsWith( 'multipart/form-data', $headers['Content-Type'][0] );
Copy link
Contributor

Choose a reason for hiding this comment

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

why starts with vs equals? also, curious on why this request is using form vs body?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why starts with vs equals?

The URL includes the query parameters and I just want the URL here.

curious on why this request is using form vs body?

Import users endpoint requires a file to be posted.

// Get a single, active database connection.
$default_db_name = 'Username-Password-Authentication';
$get_connection_result = $api->connections->getAll( 'auth0', ['id'], true, 0, 1, ['name' => $default_db_name] );
sleep(0.2);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this required? We should be lowering the time each run takes, because of the CI OSS plan limits. 🧀 🐀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Management API limits

@joshcanhelp joshcanhelp merged commit 8cfd84c into master Sep 19, 2019
@joshcanhelp joshcanhelp deleted the add-jobs-tests branch September 19, 2019 22:01
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants