Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/db/e2e/db_test_impl.dart

Issue 2285803002: Upgrade to use stable `package:googleapis/v1.dart` of datastore (Closed) Base URL: git@github.com:dart-lang/gcloud.git@master
Patch Set: Update upper constraint on http_parser Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/datastore/e2e/utils.dart ('k') | test/db/e2e/metamodel_test_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library db_test; 5 library db_test;
6 6
7 /// NOTE: In order to run these tests, the following datastore indices must 7 /// NOTE: In order to run these tests, the following datastore indices must
8 /// exist: 8 /// exist:
9 /// $ cat index.yaml 9 /// $ cat index.yaml
10 /// indexes: 10 /// indexes:
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 var usersSortedAndFilteredNameDescNicknameDesc = 436 var usersSortedAndFilteredNameDescNicknameDesc =
437 usersSortedNameDescNicknameDesc.where((User u) { 437 usersSortedNameDescNicknameDesc.where((User u) {
438 return LOWER_BOUND.compareTo(u.name) <= 0; 438 return LOWER_BOUND.compareTo(u.name) <= 0;
439 }).toList(); 439 }).toList();
440 440
441 var fooUsers = users.where( 441 var fooUsers = users.where(
442 (User u) => u.languages.contains('foo')).toList(); 442 (User u) => u.languages.contains('foo')).toList();
443 var barUsers = users.where( 443 var barUsers = users.where(
444 (User u) => u.languages.contains('bar')).toList(); 444 (User u) => u.languages.contains('bar')).toList();
445 var usersWithWife = users.where( 445 var usersWithWife = users.where(
446 (User u) => u.wife == root.append(User, id: 42 + 3)); 446 (User u) => u.wife == root.append(User, id: 42 + 3)).toList();
447 447
448 var allInserts = [] 448 var allInserts = []
449 ..addAll(users) 449 ..addAll(users)
450 ..addAll(expandoPersons); 450 ..addAll(expandoPersons);
451 var allKeys = allInserts.map((db.Model model) => model.key).toList(); 451 var allKeys = allInserts.map((db.Model model) => model.key).toList();
452 return store.commit(inserts: allInserts).then((_) { 452 return store.commit(inserts: allInserts).then((_) {
453 return waitUntilEntitiesReady(store, allKeys, partition).then((_) { 453 return waitUntilEntitiesReady(store, allKeys, partition).then((_) {
454 var tests = [ 454 var tests = [
455 // Queries for [Person] return no results, we only have [User] 455 // Queries for [Person] return no results, we only have [User]
456 // objects. 456 // objects.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 var scopes = datastore_impl.DatastoreImpl.SCOPES; 683 var scopes = datastore_impl.DatastoreImpl.SCOPES;
684 684
685 withAuthClient(scopes, (String project, httpClient) { 685 withAuthClient(scopes, (String project, httpClient) {
686 var datastore = new datastore_impl.DatastoreImpl(httpClient, 's~$project'); 686 var datastore = new datastore_impl.DatastoreImpl(httpClient, 's~$project');
687 return datastore_test.cleanupDB(datastore, null).then((_) { 687 return datastore_test.cleanupDB(datastore, null).then((_) {
688 return runE2EUnittest( 688 return runE2EUnittest(
689 () => runTests(new db.DatastoreDB(datastore), null)); 689 () => runTests(new db.DatastoreDB(datastore), null));
690 }); 690 });
691 }); 691 });
692 } 692 }
OLDNEW
« no previous file with comments | « test/datastore/e2e/utils.dart ('k') | test/db/e2e/metamodel_test_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698