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

Unified Diff: go/src/infra/gae/libs/wrapper/taskqueue_testable.go

Issue 1151473003: Better attempt at an appengine wrapper. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: pointer! Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: go/src/infra/gae/libs/wrapper/taskqueue_testable.go
diff --git a/go/src/infra/gae/libs/wrapper/taskqueue_testable.go b/go/src/infra/gae/libs/wrapper/taskqueue_testable.go
new file mode 100644
index 0000000000000000000000000000000000000000..a4bcd30bee81f9a3c2fd57a6ae9c9060bf3f0c84
--- /dev/null
+++ b/go/src/infra/gae/libs/wrapper/taskqueue_testable.go
@@ -0,0 +1,26 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package wrapper
+
+import (
+ "appengine/taskqueue"
+)
+
+// QueueData is {queueName: {taskName: *Task}}
+type QueueData map[string]map[string]*taskqueue.Task
+
+// AnonymousQueueData is {queueName: [*Task]}
+type AnonymousQueueData map[string][]*taskqueue.Task
+
+// TQTestable is the testable interface for fake taskqueue implementations
+type TQTestable interface {
+ Testable
+
+ AddQueue(queueName string)
M-A Ruel 2015/05/25 17:14:52 CreateQueue?
iannucci 2015/05/26 18:25:06 done
+ GetScheduledTasks() QueueData
+ GetTombstonedTasks() QueueData
+ GetTransactionTasks() AnonymousQueueData
+ ResetTasks()
+}

Powered by Google App Engine
This is Rietveld 408576698