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

Function TestDefaultVersion

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

Source from the content-addressed store, hash-verified

71}
72
73func TestDefaultVersion(t *testing.T) {
74 c := aetesting.FakeSingleContext(t, "modules", "GetDefaultVersion", func(req *pb.GetDefaultVersionRequest, res *pb.GetDefaultVersionResponse) error {
75 if *req.Module != module {
76 t.Errorf("Module = %v, want %v", req.Module, module)
77 }
78 res.Version = proto.String(version)
79 return nil
80 })
81 got, err := DefaultVersion(c, module)
82 if err != nil {
83 t.Fatalf("DefaultVersion: %v", err)
84 }
85 if got != version {
86 t.Errorf("Version = %v, want %v", got, version)
87 }
88}
89
90func TestStart(t *testing.T) {
91 c := aetesting.FakeSingleContext(t, "modules", "StartModule", func(req *pb.StartModuleRequest, res *pb.StartModuleResponse) error {

Callers

nothing calls this directly

Calls 3

FakeSingleContextFunction · 0.92
DefaultVersionFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…