@@ -5,34 +5,34 @@ import (
55 "fmt"
66 "testing"
77
8- "github.com/stretchr/testify/assert"
98 "github.com/linode/linodego"
9+ "github.com/stretchr/testify/assert"
1010 "golang.org/x/exp/slices"
1111)
1212
1313func TestListStackscripts (t * testing.T ) {
14- // Mock the API response to match the expected structure for a paginated response
15- fixtureData , err := fixtures .GetFixture ("stackscripts_list" )
16- assert .NoError (t , err )
14+ // Mock the API response to match the expected structure for a paginated response
15+ fixtureData , err := fixtures .GetFixture ("stackscripts_list" )
16+ assert .NoError (t , err )
1717
18- var base ClientBaseCase
19- base .SetUp (t )
20- defer base .TearDown (t )
18+ var base ClientBaseCase
19+ base .SetUp (t )
20+ defer base .TearDown (t )
2121
22- // Mock the request with a correct paginated structure
23- base .MockGet ("linode/stackscripts" , fixtureData )
22+ // Mock the request with a correct paginated structure
23+ base .MockGet ("linode/stackscripts" , fixtureData )
2424
25- stackscripts , err := base .Client .ListStackscripts (context .Background (), & linodego.ListOptions {})
26- assert .NoError (t , err )
25+ stackscripts , err := base .Client .ListStackscripts (context .Background (), & linodego.ListOptions {})
26+ assert .NoError (t , err )
2727
28- assert .NotEmpty (t , stackscripts , "Expected non-empty stackscripts list" )
28+ assert .NotEmpty (t , stackscripts , "Expected non-empty stackscripts list" )
2929
30- // Check if a specific stackscript exists using slices.ContainsFunc
31- exists := slices .ContainsFunc (stackscripts , func (stackscript linodego.Stackscript ) bool {
32- return stackscript .Label == "Test Stackscript"
33- })
30+ // Check if a specific stackscript exists using slices.ContainsFunc
31+ exists := slices .ContainsFunc (stackscripts , func (stackscript linodego.Stackscript ) bool {
32+ return stackscript .Label == "Test Stackscript"
33+ })
3434
35- assert .True (t , exists , "Expected stackscripts list to contain 'Test Stackscript'" )
35+ assert .True (t , exists , "Expected stackscripts list to contain 'Test Stackscript'" )
3636}
3737
3838func TestCreateStackscript (t * testing.T ) {
0 commit comments