@@ -17,9 +17,7 @@ import (
17
17
)
18
18
19
19
func TestRepositories_CRUD (t * testing.T ) {
20
- if ! checkAuth ("TestRepositories_CRUD" ) {
21
- return
22
- }
20
+ skipIfMissingAuth (t )
23
21
24
22
repo := createRandomTestRepository (t , "" , true )
25
23
@@ -75,9 +73,7 @@ func TestRepositories_BranchesTags(t *testing.T) {
75
73
}
76
74
77
75
func TestRepositories_EditBranches (t * testing.T ) {
78
- if ! checkAuth ("TestRepositories_EditBranches" ) {
79
- return
80
- }
76
+ skipIfMissingAuth (t )
81
77
82
78
repo := createRandomTestRepository (t , "" , true )
83
79
@@ -148,9 +144,7 @@ func TestRepositories_EditBranches(t *testing.T) {
148
144
}
149
145
150
146
func TestRepositories_ListByAuthenticatedUser (t * testing.T ) {
151
- if ! checkAuth ("TestRepositories_ListByAuthenticatedUser" ) {
152
- return
153
- }
147
+ skipIfMissingAuth (t )
154
148
155
149
_ , _ , err := client .Repositories .ListByAuthenticatedUser (t .Context (), nil )
156
150
if err != nil {
@@ -177,9 +171,7 @@ func TestRepositories_ListByUser(t *testing.T) {
177
171
}
178
172
179
173
func TestRepositories_DownloadReleaseAsset (t * testing.T ) {
180
- if ! checkAuth ("TestRepositories_DownloadReleaseAsset" ) {
181
- return
182
- }
174
+ skipIfMissingAuth (t )
183
175
184
176
rc , _ , err := client .Repositories .DownloadReleaseAsset (t .Context (), "andersjanmyr" , "goose" , 484892 , http .DefaultClient )
185
177
if err != nil {
@@ -193,9 +185,7 @@ func TestRepositories_DownloadReleaseAsset(t *testing.T) {
193
185
}
194
186
195
187
func TestRepositories_Autolinks (t * testing.T ) {
196
- if ! checkAuth ("TestRepositories_Autolinks" ) {
197
- return
198
- }
188
+ skipIfMissingAuth (t )
199
189
200
190
repo := createRandomTestRepository (t , "" , true )
201
191
0 commit comments