8
8
"testing"
9
9
10
10
"github.com/fastly/go-fastly/v11/fastly"
11
- "github.com/fastly/go-fastly/v11/fastly/ngwaf/v1/common "
11
+ "github.com/fastly/go-fastly/v11/fastly/ngwaf/v1/scope "
12
12
)
13
13
14
14
const (
@@ -20,14 +20,14 @@ const (
20
20
)
21
21
22
22
func TestClient_Lists_WorkspaceScope (t * testing.T ) {
23
- runListsTest (t , common .ScopeTypeWorkspace , fastly .TestNGWAFWorkspaceID )
23
+ runListsTest (t , scope .ScopeTypeWorkspace , fastly .TestNGWAFWorkspaceID )
24
24
}
25
25
26
26
func TestClient_Lists_AccountScope (t * testing.T ) {
27
- runListsTest (t , common .ScopeTypeAccount , "*" ) // assuming TestNGWAFAccountID exists
27
+ runListsTest (t , scope .ScopeTypeAccount , "*" ) // assuming TestNGWAFAccountID exists
28
28
}
29
29
30
- func runListsTest (t * testing.T , scopeType common. ScopeType , appliesToID string ) {
30
+ func runListsTest (t * testing.T , scopeType scope. Type , appliesToID string ) {
31
31
var err error
32
32
listEntries := []string {listEntry }
33
33
testListName := listName + string (scopeType )
@@ -40,7 +40,7 @@ func runListsTest(t *testing.T, scopeType common.ScopeType, appliesToID string)
40
40
Description : fastly .ToPointer (listDescription ),
41
41
Entries : fastly .ToPointer (listEntries ),
42
42
Name : fastly .ToPointer (testListName ),
43
- Scope : & common .Scope {
43
+ Scope : & scope .Scope {
44
44
Type : scopeType ,
45
45
AppliesTo : []string {appliesToID },
46
46
},
@@ -77,7 +77,7 @@ func runListsTest(t *testing.T, scopeType common.ScopeType, appliesToID string)
77
77
fastly .Record (t , fmt .Sprintf ("%s_delete_list" , scopeType ), func (c * fastly.Client ) {
78
78
err = Delete (context .TODO (), c , & DeleteInput {
79
79
ListID : fastly .ToPointer (list .ListID ),
80
- Scope : & common .Scope {
80
+ Scope : & scope .Scope {
81
81
Type : scopeType ,
82
82
AppliesTo : []string {appliesToID },
83
83
},
@@ -93,7 +93,7 @@ func runListsTest(t *testing.T, scopeType common.ScopeType, appliesToID string)
93
93
fastly .Record (t , fmt .Sprintf ("%s_get_list" , scopeType ), func (c * fastly.Client ) {
94
94
getList , err = Get (context .TODO (), c , & GetInput {
95
95
ListID : fastly .ToPointer (list .ListID ),
96
- Scope : & common .Scope {
96
+ Scope : & scope .Scope {
97
97
Type : scopeType ,
98
98
AppliesTo : []string {appliesToID },
99
99
},
@@ -136,7 +136,7 @@ func runListsTest(t *testing.T, scopeType common.ScopeType, appliesToID string)
136
136
Description : fastly .ToPointer (updateListDescription ),
137
137
Entries : fastly .ToPointer (updateListEntries ),
138
138
ListID : fastly .ToPointer (list .ListID ),
139
- Scope : & common .Scope {
139
+ Scope : & scope .Scope {
140
140
Type : scopeType ,
141
141
AppliesTo : []string {appliesToID },
142
142
},
@@ -172,7 +172,7 @@ func runListsTest(t *testing.T, scopeType common.ScopeType, appliesToID string)
172
172
// List all lists.
173
173
fastly .Record (t , fmt .Sprintf ("%s_list_lists" , scopeType ), func (c * fastly.Client ) {
174
174
lists , err = ListLists (context .TODO (), c , & ListInput {
175
- Scope : & common .Scope {
175
+ Scope : & scope .Scope {
176
176
Type : scopeType ,
177
177
AppliesTo : []string {appliesToID },
178
178
},
0 commit comments