MCPcopy
hub / github.com/dgraph-io/dgraph / SetupSubTest

Method SetupSubTest

systest/plugin/upgrade_test.go:30–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (psuite *PluginTestSuite) SetupSubTest() {
31 // The TestPlugins() invokes subtest function, hence using
32 // SetupSubTest() instead of SetupTest().
33 conf := dgraphtest.NewClusterConfig().WithNumAlphas(1).WithNumZeros(1).WithReplicas(1).
34 WithVersion(psuite.uc.Before).WithCustomPlugins()
35 c, err := dgraphtest.NewLocalCluster(conf)
36 x.Panic(err)
37 if err := c.Start(); err != nil {
38 c.Cleanup(true)
39 panic(err)
40 }
41
42 psuite.dc = c
43 psuite.lc = c
44}
45
46func (psuite *PluginTestSuite) TearDownTest() {
47 psuite.lc.Cleanup(psuite.T().Failed())

Callers

nothing calls this directly

Calls 10

StartMethod · 0.95
CleanupMethod · 0.95
NewClusterConfigFunction · 0.92
NewLocalClusterFunction · 0.92
PanicFunction · 0.92
WithCustomPluginsMethod · 0.80
WithVersionMethod · 0.80
WithReplicasMethod · 0.80
WithNumZerosMethod · 0.80
WithNumAlphasMethod · 0.80

Tested by

no test coverage detected