-
Notifications
You must be signed in to change notification settings - Fork 102
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
List workspace variable sets #552
Conversation
00db685
to
ff6cb30
Compare
|
||
t.Run("when Workspace ID is an invalid ID", func(t *testing.T) { | ||
vsl, err := client.VariableSets.ListForWorkspace(ctx, badIdentifier, nil) | ||
assert.Nil(t, vsl) |
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.
test assertion ErrInvalidWorkspaceID
instead of ErrInvalidOrg
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.
Looking good 🎉
ff6cb30
to
5d4da4e
Compare
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.
🎉
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. |
Description
Build off of #520 and #551, maintaining the original interface but adding missing test helper to apply a variable set to a workspace (otherwise test fails).
This also fixes the assertion that a given variable set is contained within the list fetched from workspace.
assert.Contains()
is a tricky call because it performs deep equality. A resource may or may not have relationships defined depending on the endpoint you're calling, in this case: