[{"data":1,"prerenderedAt":340},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fmain\u002Fcontribute\u002Ftesting":3},{"id":4,"title":5,"body":6,"description":327,"extension":328,"group":329,"meta":330,"navigation":331,"order":332,"path":333,"section":334,"seo":335,"source":336,"stem":337,"version":338,"__hash__":339},"docs\u002Fdocs\u002Fmain\u002Fcontribute\u002Ftesting.md","Framework testing and verification",{"type":7,"value":8,"toc":319},"minimark",[9,14,18,88,98,102,109,192,195,199,246,252,263,267,270,286,295,299,308,312,315],[10,11,13],"h2",{"id":12},"start-with-the-root-module","Start with the root module",[15,16,17],"p",{},"From the framework repository root:",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-sh shiki shiki-themes light-plus light-plus dark-plus","gofmt -l .\ngo mod verify\ngo test .\u002F...\ngo vet .\u002F...\ngo build .\u002F...\n","sh","",[26,27,28,45,57,68,78],"code",{"__ignoreMap":24},[29,30,33,37,41],"span",{"class":31,"line":32},"line",1,[29,34,36],{"class":35},"swoLU","gofmt",[29,38,40],{"class":39},"stxUP"," -l",[29,42,44],{"class":43},"sFD8J"," .\n",[29,46,48,51,54],{"class":31,"line":47},2,[29,49,50],{"class":35},"go",[29,52,53],{"class":43}," mod",[29,55,56],{"class":43}," verify\n",[29,58,60,62,65],{"class":31,"line":59},3,[29,61,50],{"class":35},[29,63,64],{"class":43}," test",[29,66,67],{"class":43}," .\u002F...\n",[29,69,71,73,76],{"class":31,"line":70},4,[29,72,50],{"class":35},[29,74,75],{"class":43}," vet",[29,77,67],{"class":43},[29,79,81,83,86],{"class":31,"line":80},5,[29,82,50],{"class":35},[29,84,85],{"class":43}," build",[29,87,67],{"class":43},[15,89,90,93,94,97],{},[26,91,92],{},"gofmt -l ."," should print no unformatted files. Use ",[26,95,96],{},"gofmt -w"," only on the files you intend to change. Add a focused regression test for a behavioral fix, and run the broader checks appropriate to the packages affected.",[10,99,101],{"id":100},"check-independent-modules","Check independent modules",[15,103,104,105,108],{},"The root ",[26,106,107],{},"go test .\u002F..."," does not include nested modules. The upstream test workflow also checks:",[19,110,112],{"className":21,"code":111,"language":23,"meta":24,"style":24},"go -C contracts test .\u002F...\ngo -C integration\u002Frpc test .\u002F...\ngo -C integration\u002Frpc vet .\u002F...\ngo -C integration\u002Frpc build .\u002F...\ngo -C examples\u002Fmicroservices\u002Fservices\u002Fidentity test .\u002F...\ngo -C examples\u002Fmicroservices\u002Fservices\u002Forders test .\u002F...\n",[26,113,114,128,141,153,165,178],{"__ignoreMap":24},[29,115,116,118,121,124,126],{"class":31,"line":32},[29,117,50],{"class":35},[29,119,120],{"class":39}," -C",[29,122,123],{"class":43}," contracts",[29,125,64],{"class":43},[29,127,67],{"class":43},[29,129,130,132,134,137,139],{"class":31,"line":47},[29,131,50],{"class":35},[29,133,120],{"class":39},[29,135,136],{"class":43}," integration\u002Frpc",[29,138,64],{"class":43},[29,140,67],{"class":43},[29,142,143,145,147,149,151],{"class":31,"line":59},[29,144,50],{"class":35},[29,146,120],{"class":39},[29,148,136],{"class":43},[29,150,75],{"class":43},[29,152,67],{"class":43},[29,154,155,157,159,161,163],{"class":31,"line":70},[29,156,50],{"class":35},[29,158,120],{"class":39},[29,160,136],{"class":43},[29,162,85],{"class":43},[29,164,67],{"class":43},[29,166,167,169,171,174,176],{"class":31,"line":80},[29,168,50],{"class":35},[29,170,120],{"class":39},[29,172,173],{"class":43}," examples\u002Fmicroservices\u002Fservices\u002Fidentity",[29,175,64],{"class":43},[29,177,67],{"class":43},[29,179,181,183,185,188,190],{"class":31,"line":180},6,[29,182,50],{"class":35},[29,184,120],{"class":39},[29,186,187],{"class":43}," examples\u002Fmicroservices\u002Fservices\u002Forders",[29,189,64],{"class":43},[29,191,67],{"class":43},[15,193,194],{},"Resolve the relevant modules' dependencies and local-workspace setup before running them. Follow their README files when a service requires additional configuration.",[10,196,198],{"id":197},"typed-contracts-and-generators","Typed contracts and generators",[19,200,202],{"className":21,"code":201,"language":23,"meta":24,"style":24},"go run .\u002Fcmd\u002Fgonex grpc check\ngo run .\u002Fcmd\u002Fgonex openapi validate --file tests\u002Ftestdata\u002Fbasic.openapi.json --against tests\u002Ftestdata\u002Freleases\u002Fv0.1.0.openapi.json\n",[26,203,204,220],{"__ignoreMap":24},[29,205,206,208,211,214,217],{"class":31,"line":32},[29,207,50],{"class":35},[29,209,210],{"class":43}," run",[29,212,213],{"class":43}," .\u002Fcmd\u002Fgonex",[29,215,216],{"class":43}," grpc",[29,218,219],{"class":43}," check\n",[29,221,222,224,226,228,231,234,237,240,243],{"class":31,"line":47},[29,223,50],{"class":35},[29,225,210],{"class":43},[29,227,213],{"class":43},[29,229,230],{"class":43}," openapi",[29,232,233],{"class":43}," validate",[29,235,236],{"class":39}," --file",[29,238,239],{"class":43}," tests\u002Ftestdata\u002Fbasic.openapi.json",[29,241,242],{"class":39}," --against",[29,244,245],{"class":43}," tests\u002Ftestdata\u002Freleases\u002Fv0.1.0.openapi.json\n",[15,247,248,251],{},[26,249,250],{},"tests\u002Ftestdata\u002Freleases\u002Fv0.1.0.openapi.json"," is a compatibility fixture, not evidence that a v0.1.0 release is published. Generator changes should preserve handwritten files, reject unsafe paths and have repeatable output.",[15,253,254,255,262],{},"The contracts workflow also installs the pinned Buf tooling, lints and checks Protobuf compatibility, runs generation and verifies that generated files have no unexplained diff. Inspect the ",[256,257,261],"a",{"href":258,"rel":259},"https:\u002F\u002Fgithub.com\u002Famkargar\u002Fgonex\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Fcontracts.yml",[260],"nofollow","actual contracts workflow"," for its current commands.",[10,264,266],{"id":265},"integration-and-platform-checks","Integration and platform checks",[15,268,269],{},"The upstream workflow includes a disposable PostgreSQL service, SQLite integration and a Linux race-detector run. For local race checks on a suitable Go\u002FCGO platform:",[19,271,273],{"className":21,"code":272,"language":23,"meta":24,"style":24},"go test -race .\u002F...\n",[26,274,275],{"__ignoreMap":24},[29,276,277,279,281,284],{"class":31,"line":32},[29,278,50],{"class":35},[29,280,64],{"class":43},[29,282,283],{"class":39}," -race",[29,285,67],{"class":43},[15,287,288,289,294],{},"A test skipped because an external database is unavailable is not a verified database integration. Use the ",[256,290,293],{"href":291,"rel":292},"https:\u002F\u002Fgithub.com\u002Famkargar\u002Fgonex\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Ftest.yml",[260],"upstream test workflow"," as the configuration reference, and report skipped or unexecuted checks honestly.",[10,296,298],{"id":297},"benchmark-changes-carefully","Benchmark changes carefully",[15,300,301,302,307],{},"Use paired workloads on the same machine and retain raw output. The ",[256,303,306],{"href":304,"rel":305},"https:\u002F\u002Fgithub.com\u002Famkargar\u002Fgonex\u002Fblob\u002Fmain\u002Fdocs\u002Fbenchmarks\u002FREADME.md",[260],"upstream benchmark methodology"," defines workloads and budgets; small local measurements do not establish production throughput.",[10,309,311],{"id":310},"report-actual-evidence","Report actual evidence",[15,313,314],{},"In a contribution, list the commands you ran, their outcomes and material checks you could not run. Do not report configured CI targets as passed until the hosted runs succeed.",[316,317,318],"style",{},"html pre.shiki code .swoLU, html code.shiki .swoLU{--shiki-light:#795E26;--shiki-default:#795E26;--shiki-dark:#DCDCAA}html pre.shiki code .stxUP, html code.shiki .stxUP{--shiki-light:#0000FF;--shiki-default:#0000FF;--shiki-dark:#569CD6}html pre.shiki code .sFD8J, html code.shiki .sFD8J{--shiki-light:#A31515;--shiki-default:#A31515;--shiki-dark:#CE9178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":24,"searchDepth":47,"depth":47,"links":320},[321,322,323,324,325,326],{"id":12,"depth":47,"text":13},{"id":100,"depth":47,"text":101},{"id":197,"depth":47,"text":198},{"id":265,"depth":47,"text":266},{"id":297,"depth":47,"text":298},{"id":310,"depth":47,"text":311},"Run Gonex formatting, unit, contract, integration, race and benchmark checks without confusing framework tests with application tests.","md","DEVELOP THE FRAMEWORK",{},true,30,"\u002Fdocs\u002Fmain\u002Fcontribute\u002Ftesting","contribute",{"title":5,"description":327},null,"docs\u002Fmain\u002Fcontribute\u002Ftesting","main","bPNexUbtgVox09urL36bydfigsTM2gY9ol_oY8nyb3g",1792521640794]