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 entitlements for Run Tasks #381

Merged
merged 1 commit into from May 4, 2022

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Apr 19, 2022

Description

This PR adds the beta API changes for the Run Tasks entitlement as per RFC TF-479

Testing plan

  1. Start up an instance of the development Terraform Cloud environment.
  2. Run the Integration tests with ENABLE_BETA

External links

@glennsarti
Copy link
Contributor Author

FYI @cam-stitt and @tstormk

@glennsarti
Copy link
Contributor Author

glennsarti commented Apr 19, 2022

ENABLE_BETA=1 go test -run TestOrganizations -v ./... -tags=integration

=== RUN   TestOrganizationsList

...

=== RUN   TestOrganizationsReadEntitlements
=== RUN   TestOrganizationsReadEntitlements/when_the_org_exists
=== RUN   TestOrganizationsReadEntitlements/with_invalid_name
=== RUN   TestOrganizationsReadEntitlements/when_the_org_does_not_exist
--- PASS: TestOrganizationsReadEntitlements (1.60s)
    --- PASS: TestOrganizationsReadEntitlements/when_the_org_exists (0.23s)
    --- PASS: TestOrganizationsReadEntitlements/with_invalid_name (0.00s)
    --- PASS: TestOrganizationsReadEntitlements/when_the_org_does_not_exist (0.23s)
=== RUN   TestOrganizationsReadRunQueue
    organization_integration_test.go:332: Capacity queues are not available in the API
--- SKIP: TestOrganizationsReadRunQueue (0.00s)
=== RUN   TestOrganizationsReadRunTasksPermission
=== RUN   TestOrganizationsReadRunTasksPermission/when_the_org_exists
=== RUN   TestOrganizationsReadRunTasksPermission/when_the_org_exists/permissions_are_properly_decoded
--- PASS: TestOrganizationsReadRunTasksPermission (1.41s)
    --- PASS: TestOrganizationsReadRunTasksPermission/when_the_org_exists (0.39s)
        --- PASS: TestOrganizationsReadRunTasksPermission/when_the_org_exists/permissions_are_properly_decoded (0.00s)
=== RUN   TestOrganizationsReadRunTasksEntitlement
=== RUN   TestOrganizationsReadRunTasksEntitlement/when_the_org_exists
--- PASS: TestOrganizationsReadRunTasksEntitlement (1.25s)
    --- PASS: TestOrganizationsReadRunTasksEntitlement/when_the_org_exists (0.23s)
PASS
ok      github.com/hashicorp/go-tfe     15.869s
?       github.com/hashicorp/go-tfe/examples/organizations      [no test files]
?       github.com/hashicorp/go-tfe/examples/workspaces [no test files]
?       github.com/hashicorp/go-tfe/mocks       [no test files]

@glennsarti
Copy link
Contributor Author

Test test failures are weird. They're also happening on main so something's screwy

@glennsarti glennsarti force-pushed the gs/add-run-tasks-permission-and-entitlements branch from 9553313 to 4941235 Compare April 19, 2022 04:27
@glennsarti glennsarti added the wip Work in progress label Apr 20, 2022
@glennsarti glennsarti changed the title Add permissions and entitlements for Run Tasks {WIP} Add permissions and entitlements for Run Tasks Apr 20, 2022
This commit adds the beta API changes for the Run Tasks
entitlement as per RFC TF-479:
* Add run-tasks to Organization entitlement set

This commit also adds tests for this beta feature.
@glennsarti glennsarti force-pushed the gs/add-run-tasks-permission-and-entitlements branch from 4941235 to 9c43183 Compare May 4, 2022 02:12
@glennsarti glennsarti marked this pull request as ready for review May 4, 2022 02:13
@glennsarti glennsarti changed the title {WIP} Add permissions and entitlements for Run Tasks Add entitlements for Run Tasks May 4, 2022
@glennsarti glennsarti self-assigned this May 4, 2022
@glennsarti glennsarti removed the wip Work in progress label May 4, 2022
Copy link
Contributor

@sebasslash sebasslash left a comment

Choose a reason for hiding this comment

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

🔥

@sebasslash sebasslash merged commit c8acf75 into main May 4, 2022
@sebasslash sebasslash deleted the gs/add-run-tasks-permission-and-entitlements branch May 4, 2022 14:20
@github-actions
Copy link

github-actions bot commented May 4, 2022

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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.

None yet

3 participants