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

Adds PATCH tag-bindings #991

Conversation

brandonc
Copy link
Collaborator

Description

Adds support for the PATCH tag-bindings resources (/workspaces/:id/tag-bindings and /projects/:id/tag-bindings)

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

$ ENABLE_BETA=1 go test ./... -v -run "Test(Projects|Workspaces)AddTagBindings"
?       github.com/hashicorp/go-tfe/examples/backing_data       [no test files]
?       github.com/hashicorp/go-tfe/examples/configuration_versions     [no test files]
?       github.com/hashicorp/go-tfe/examples/organizations      [no test files]
?       github.com/hashicorp/go-tfe/examples/registry_modules   [no test files]
?       github.com/hashicorp/go-tfe/examples/run_errors [no test files]
?       github.com/hashicorp/go-tfe/examples/state_versions     [no test files]
?       github.com/hashicorp/go-tfe/examples/users      [no test files]
?       github.com/hashicorp/go-tfe/examples/workspaces [no test files]
?       github.com/hashicorp/go-tfe/mocks       [no test files]
=== RUN   TestProjectsAddTagBindings
=== RUN   TestProjectsAddTagBindings/when_adding_tag_bindings_to_a_project
=== RUN   TestProjectsAddTagBindings/when_adding_26_tags
--- PASS: TestProjectsAddTagBindings (1.87s)
    --- PASS: TestProjectsAddTagBindings/when_adding_tag_bindings_to_a_project (0.23s)
    --- PASS: TestProjectsAddTagBindings/when_adding_26_tags (0.21s)
=== RUN   TestWorkspacesAddTagBindings
=== RUN   TestWorkspacesAddTagBindings/when_adding_tag_bindings_to_a_workspace
=== RUN   TestWorkspacesAddTagBindings/when_adding_26_tags
--- PASS: TestWorkspacesAddTagBindings (2.02s)
    --- PASS: TestWorkspacesAddTagBindings/when_adding_tag_bindings_to_a_workspace (0.26s)
    --- PASS: TestWorkspacesAddTagBindings/when_adding_26_tags (0.23s)
PASS
ok      github.com/hashicorp/go-tfe     4.148s
...

@brandonc brandonc force-pushed the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch from f78dbd4 to e5c4ecb Compare October 25, 2024 12:56
@brandonc brandonc changed the base branch from main to release-v1.69.0 October 25, 2024 12:56
@brandonc brandonc mentioned this pull request Oct 25, 2024
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.

Are we missing a changelog entry?

})
require.NoError(t, err)

assert.Len(t, bindings, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

💅

Suggested change
assert.Len(t, bindings, 2)
require.Len(t, bindings, 2)

to prevent a panic downstream

@brandonc brandonc merged commit 73eefba into release-v1.69.0 Oct 25, 2024
7 checks passed
@brandonc brandonc deleted the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch October 25, 2024 14:33
Copy link

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.

@brandonc brandonc restored the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch October 25, 2024 18:48
@brandonc brandonc deleted the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch October 25, 2024 18:50
@brandonc brandonc restored the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch October 25, 2024 18:50
@brandonc brandonc deleted the TF-21287-patch-endpoint-for-adding-but-never-replacing-tag-bindings branch October 26, 2024 02:34
brandonc added a commit that referenced this pull request Oct 26, 2024
…ding-but-never-replacing-tag-bindings2

#991 was missing from release
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