Skip to content

Conversation

JarrettSpiker
Copy link
Contributor

Description

I noticed that we were missing this bit of functionality in the API docs and in go-tfe

Adds a Query parameter to variable set list options

Testing plan

  1. Test searching for organization varsets with a parameter that returns a subset of results
  2. Test searching for organization varsets with a parameter that returns no results
  3. Test searching for project varsets with a parameter that returns a subset of results
  4. Test searching for project varsets with a parameter that returns no results
  5. Test searching for workspace varsets with a parameter that returns a subset of results
  6. Test searching for workspace varsets with a parameter that returns no results

External links

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.

❯ go test -run TestVariableSetsList -v
=== RUN   TestVariableSetsList
=== RUN   TestVariableSetsList/without_list_options
=== RUN   TestVariableSetsList/with_list_options
=== RUN   TestVariableSetsList/when_Organization_name_is_an_invalid_ID
=== RUN   TestVariableSetsList/with_query_parameter
--- PASS: TestVariableSetsList (2.56s)
    --- PASS: TestVariableSetsList/without_list_options (0.22s)
    --- PASS: TestVariableSetsList/with_list_options (0.21s)
    --- PASS: TestVariableSetsList/when_Organization_name_is_an_invalid_ID (0.00s)
    --- PASS: TestVariableSetsList/with_query_parameter (0.21s)
=== RUN   TestVariableSetsListForWorkspace
=== RUN   TestVariableSetsListForWorkspace/without_list_options
=== RUN   TestVariableSetsListForWorkspace/with_list_options
=== RUN   TestVariableSetsListForWorkspace/when_Workspace_ID_is_an_invalid_ID
=== RUN   TestVariableSetsListForWorkspace/with_query_parameter
--- PASS: TestVariableSetsListForWorkspace (3.44s)
    --- PASS: TestVariableSetsListForWorkspace/without_list_options (0.24s)
    --- PASS: TestVariableSetsListForWorkspace/with_list_options (0.20s)
    --- PASS: TestVariableSetsListForWorkspace/when_Workspace_ID_is_an_invalid_ID (0.00s)
    --- PASS: TestVariableSetsListForWorkspace/with_query_parameter (0.20s)
=== RUN   TestVariableSetsListForProject
=== RUN   TestVariableSetsListForProject/without_list_options
=== RUN   TestVariableSetsListForProject/with_list_options
=== RUN   TestVariableSetsListForProject/when_Project_ID_is_an_invalid_ID
=== RUN   TestVariableSetsListForProject/with_query_parameter
--- PASS: TestVariableSetsListForProject (3.75s)
    --- PASS: TestVariableSetsListForProject/without_list_options (0.24s)
    --- PASS: TestVariableSetsListForProject/with_list_options (0.20s)
    --- PASS: TestVariableSetsListForProject/when_Project_ID_is_an_invalid_ID (0.00s)
    --- PASS: TestVariableSetsListForProject/with_query_parameter (0.20s)
PASS
ok      github.com/hashicorp/go-tfe     9.944s

...

@JarrettSpiker JarrettSpiker requested a review from a team as a code owner March 26, 2024 20:25
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

Great. You may have noticed that everything in CI failed. This should be fixed now if you were to rebase.

@JarrettSpiker JarrettSpiker merged commit a853981 into main Apr 16, 2024
@JarrettSpiker JarrettSpiker deleted the jspiker/varsetSearch branch April 16, 2024 13:26
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.

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