Skip to content

Commit f4006ea

Browse files
fix linter
code cleanup
1 parent 39afc01 commit f4006ea

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

variable_set.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,8 @@ func (s *variableSets) ApplyToStacks(ctx context.Context, variableSetID string,
500500
if err != nil {
501501
return err
502502
}
503-
a := req.Do(ctx, nil)
504-
fmt.Printf("a: %v\n", a)
505-
return a
503+
504+
return req.Do(ctx, nil)
506505
}
507506

508507
func (s *variableSets) RemoveFromStacks(ctx context.Context, variableSetID string, options *VariableSetRemoveFromStacksOptions) error {

variable_set_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func TestVariableSetsApplyToAndRemoveFromStacks(t *testing.T) {
598598

599599
// Wait for stack to be ready by triggering configuration update
600600
_, err = client.Stacks.FetchLatestFromVcs(ctx, stackTest1.ID)
601-
// Don't require this to succeed as it might not be needed
601+
require.NoError(t, err)
602602

603603
stackTest2, err := client.Stacks.Create(ctx, StackCreateOptions{
604604
Name: "test-stack-2",
@@ -773,18 +773,18 @@ func TestVariableSetsUpdateStacks(t *testing.T) {
773773

774774
// Wait for stack to be ready by triggering configuration update
775775
_, err = client.Stacks.FetchLatestFromVcs(ctx, stackTest.ID)
776-
// Don't require this to succeed as it might not be needed
776+
require.NoError(t, err)
777777

778778
t.Run("with valid stacks", func(t *testing.T) {
779779
options := VariableSetUpdateStacksOptions{
780780
Stacks: []*Stack{stackTest},
781781
}
782782

783-
vsAfter, err := client.VariableSets.UpdateStacks(ctx, vsTest.ID, &options)
783+
_, err := client.VariableSets.UpdateStacks(ctx, vsTest.ID, &options)
784784
require.NoError(t, err)
785785

786786
readOpts := &VariableSetReadOptions{Include: &[]VariableSetIncludeOpt{VariableSetStacks}}
787-
vsAfter, err = client.VariableSets.Read(ctx, vsTest.ID, readOpts)
787+
vsAfter, err := client.VariableSets.Read(ctx, vsTest.ID, readOpts)
788788
require.NoError(t, err)
789789

790790
assert.Equal(t, len(options.Stacks), len(vsAfter.Stacks))
@@ -794,7 +794,7 @@ func TestVariableSetsUpdateStacks(t *testing.T) {
794794
Stacks: []*Stack{},
795795
}
796796

797-
vsAfter, err = client.VariableSets.UpdateStacks(ctx, vsTest.ID, &options)
797+
_, err = client.VariableSets.UpdateStacks(ctx, vsTest.ID, &options)
798798
require.NoError(t, err)
799799

800800
readOpts = &VariableSetReadOptions{Include: &[]VariableSetIncludeOpt{VariableSetStacks}}

0 commit comments

Comments
 (0)