blob: 242b2a92d80b1bb8e821b2f716850c1346a59464 [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:shelf/shelf.dart' as shelf;
import 'package:test/test.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
import 'utils.dart';
void main() {
test("cloud storage upload doesn't redirect", () async {
await servePackages();
await d.credentialsFile(globalPackageServer, 'access token').create();
var pub = await startPublish(globalPackageServer);
await confirmPublish(pub);
globalPackageServer.expect('POST', '/upload', (request) async {
return shelf.Response(200);
expect(pub.stderr, emits('Failed to upload the package.'));
await pub.shouldExit(1);