MCPcopy Create free account
hub / github.com/golang/appengine / TestList

Function TestList

module/module_test.go:21–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19const instances = 3
20
21func TestList(t *testing.T) {
22 c := aetesting.FakeSingleContext(t, "modules", "GetModules", func(req *pb.GetModulesRequest, res *pb.GetModulesResponse) error {
23 res.Module = []string{"default", "mod1"}
24 return nil
25 })
26 got, err := List(c)
27 if err != nil {
28 t.Fatalf("List: %v", err)
29 }
30 want := []string{"default", "mod1"}
31 if !reflect.DeepEqual(got, want) {
32 t.Errorf("List = %v, want %v", got, want)
33 }
34}
35
36func TestSetNumInstances(t *testing.T) {
37 c := aetesting.FakeSingleContext(t, "modules", "SetNumInstances", func(req *pb.SetNumInstancesRequest, res *pb.SetNumInstancesResponse) error {

Callers

nothing calls this directly

Calls 2

FakeSingleContextFunction · 0.92
ListFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…