Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: state/export_test.go

Issue 61520045: Wire up prechecker
Patch Set: Wire up prechecker Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « state/environ_test.go ('k') | state/initialize_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/export_test.go
=== modified file 'state/export_test.go'
--- state/export_test.go 2014-01-25 11:45:42 +0000
+++ state/export_test.go 2014-02-18 05:43:06 +0000
@@ -94,14 +94,22 @@
})
}
+// SetPolicy updates the State's policy field to the
+// given Policy, and returns the old value.
+func SetPolicy(st *State, p Policy) Policy {
+ old := st.policy
+ st.policy = p
+ return old
+}
+
// TestingInitialize initializes the state and returns it. If state was not
// already initialized, and cfg is nil, the minimal default environment
// configuration will be used.
-func TestingInitialize(c *gc.C, cfg *config.Config) *State {
+func TestingInitialize(c *gc.C, cfg *config.Config, policy Policy) *State {
if cfg == nil {
cfg = testing.EnvironConfig(c)
}
- st, err := Initialize(TestingStateInfo(), cfg, TestingDialOpts())
+ st, err := Initialize(TestingStateInfo(), cfg, TestingDialOpts(), policy)
c.Assert(err, gc.IsNil)
return st
}
« no previous file with comments | « state/environ_test.go ('k') | state/initialize_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b