@@ -59,7 +59,7 @@ func getAgencyEndpoints(ctx context.Context, c driver.Client) ([]string, error)
59
59
func getAgencyConnection (ctx context.Context , t testEnv , c driver.Client ) (agency.Agency , error ) {
60
60
if os .Getenv ("TEST_CONNECTION" ) == "vst" {
61
61
// These tests assume an HTTP connetion, so we skip under this condition
62
- return nil , driver.ArangoError {HasError : true , Code : 412 }
62
+ return nil , driver.ArangoError {HasError : true , Code : 412 , ErrorMessage : "Using vst is not supported in agency tests" }
63
63
}
64
64
endpoints , err := getAgencyEndpoints (ctx , c )
65
65
if err != nil {
@@ -71,7 +71,7 @@ func getAgencyConnection(ctx context.Context, t testEnv, c driver.Client) (agenc
71
71
})
72
72
if auth := createAuthenticationFromEnv (t ); auth != nil {
73
73
// This requires a JWT token, which we not always have in this test, so we skip under this condition
74
- return nil , driver.ArangoError {HasError : true , Code : 412 }
74
+ return nil , driver.ArangoError {HasError : true , Code : 412 , ErrorMessage : "Authentication required but not supported in agency tests" }
75
75
}
76
76
result , err := agency .NewAgency (conn )
77
77
if err != nil {
@@ -114,7 +114,7 @@ func TestAgencyRead(t *testing.T) {
114
114
ctx := context .Background ()
115
115
c := createClientFromEnv (t , true )
116
116
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
117
- t .Skip ( "Not a cluster" )
117
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
118
118
} else if err != nil {
119
119
t .Fatalf ("Cluster failed: %s" , describe (err ))
120
120
} else {
@@ -133,7 +133,7 @@ func TestAgencyWrite(t *testing.T) {
133
133
ctx := context .Background ()
134
134
c := createClientFromEnv (t , true )
135
135
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
136
- t .Skip ( "Not a cluster" )
136
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
137
137
} else if err != nil {
138
138
t .Fatalf ("Cluster failed: %s" , describe (err ))
139
139
} else {
@@ -162,7 +162,7 @@ func TestAgencyWriteIfEmpty(t *testing.T) {
162
162
ctx := context .Background ()
163
163
c := createClientFromEnv (t , true )
164
164
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
165
- t .Skip ( "Not a cluster" )
165
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
166
166
} else if err != nil {
167
167
t .Fatalf ("Cluster failed: %s" , describe (err ))
168
168
} else {
@@ -194,7 +194,7 @@ func TestAgencyWriteIfEqualTo(t *testing.T) {
194
194
ctx := context .Background ()
195
195
c := createClientFromEnv (t , true )
196
196
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
197
- t .Skip ( "Not a cluster" )
197
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
198
198
} else if err != nil {
199
199
t .Fatalf ("Cluster failed: %s" , describe (err ))
200
200
} else {
@@ -235,7 +235,7 @@ func TestAgencyRemove(t *testing.T) {
235
235
ctx := context .Background ()
236
236
c := createClientFromEnv (t , true )
237
237
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
238
- t .Skip ( "Not a cluster" )
238
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
239
239
} else if err != nil {
240
240
t .Fatalf ("Cluster failed: %s" , describe (err ))
241
241
} else {
@@ -261,7 +261,7 @@ func TestAgencyRemoveIfEqualTo(t *testing.T) {
261
261
ctx := context .Background ()
262
262
c := createClientFromEnv (t , true )
263
263
if a , err := getAgencyConnection (ctx , t , c ); driver .IsPreconditionFailed (err ) {
264
- t .Skip ( "Not a cluster" )
264
+ t .Skipf ( "Skip agency test: %s" , describe ( err ) )
265
265
} else if err != nil {
266
266
t .Fatalf ("Cluster failed: %s" , describe (err ))
267
267
} else {
0 commit comments