You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -542,6 +541,14 @@ func (n *Netlify) uploadFile(ctx context.Context, d *models.Deploy, f *FileBundl
542
541
context.GetLogger(ctx).WithError(operationError).Errorf("Failed to upload file %v", f.Name)
543
542
apiErr, ok:=operationError.(apierrors.Error)
544
543
544
+
// In testing, we repeatedly get to this line, see "Failed to upload file", but no matter
545
+
// what we try, ok is always `false`, and the code we're trying to test gets skipped.
546
+
// There isn't a test case for the original code (the 401 error)
547
+
548
+
// The operation error we're receiving is "(*models.Error) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface"
549
+
// which seems like a problem with how we're stubbing the response body from the server in the test,
550
+
// but it's similar to how it's stubbed in
551
+
545
552
ifok {
546
553
ifapiErr.Code() ==401 {
547
554
sharedErr.mutex.Lock()
@@ -550,7 +557,7 @@ func (n *Netlify) uploadFile(ctx context.Context, d *models.Deploy, f *FileBundl
0 commit comments