Add go-unit test

This commit is contained in:
Cristian Dumitru 2022-10-18 16:36:41 -05:00
parent 8079cf8926
commit e0f4952e74
8 changed files with 184 additions and 32158 deletions

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="4" disabled="0" errors="0" failures="2" time="9.568500872999998">
<testsuite name="Suite1" package="/package1" tests="1" disabled="0" skipped="0" errors="0" failures="0" time="0.001759667" timestamp="2022-10-18T15:48:32">
<properties>
<property name="SuiteSucceeded" value="true"></property>
<property name="SuiteHasProgrammaticFocus" value="false"></property>
<property name="SpecialSuiteFailureReason" value=""></property>
<property name="SuiteLabels" value="[]"></property>
<property name="RandomSeed" value="1666126101"></property>
<property name="RandomizeAllSpecs" value="false"></property>
<property name="LabelFilter" value=""></property>
<property name="FocusStrings" value=""></property>
<property name="SkipStrings" value=""></property>
<property name="FocusFiles" value=""></property>
<property name="SkipFiles" value=""></property>
<property name="FailOnPending" value="false"></property>
<property name="FailFast" value="false"></property>
<property name="FlakeAttempts" value="0"></property>
<property name="EmitSpecProgress" value="false"></property>
<property name="DryRun" value="false"></property>
<property name="ParallelTotal" value="1"></property>
<property name="OutputInterceptorMode" value=""></property>
</properties>
<testcase name="[It] Should succeed" classname="Suite1" status="passed" time="0.000455833"></testcase>
</testsuite>
<testsuite name="Suite2" package="/package2" tests="3" disabled="0" skipped="0" errors="0" failures="2" time="0.135371083" timestamp="2022-10-18T15:48:32">
<properties>
<property name="SuiteSucceeded" value="true"></property>
<property name="SuiteHasProgrammaticFocus" value="false"></property>
<property name="SpecialSuiteFailureReason" value=""></property>
<property name="SuiteLabels" value="[]"></property>
<property name="RandomSeed" value="1666126101"></property>
<property name="RandomizeAllSpecs" value="false"></property>
<property name="LabelFilter" value=""></property>
<property name="FocusStrings" value=""></property>
<property name="SkipStrings" value=""></property>
<property name="FocusFiles" value=""></property>
<property name="SkipFiles" value=""></property>
<property name="FailOnPending" value="false"></property>
<property name="FailFast" value="false"></property>
<property name="FlakeAttempts" value="0"></property>
<property name="EmitSpecProgress" value="false"></property>
<property name="DryRun" value="false"></property>
<property name="ParallelTotal" value="1"></property>
<property name="OutputInterceptorMode" value=""></property>
</properties>
<testcase name="[It] Should succeed" classname="Suite2" status="passed" time="0.10459475"></testcase>
<testcase name="[It] Should succeed, but errors" classname="Suite2" status="failed" time="0.000523208">
<failure message="Expected success, but got an error:&#xA; &lt;*errors.withStack | 0x1400000ec30&gt;: {&#xA; error: &lt;*errors.withMessage | 0x1400007e7c0&gt;{&#xA; cause: &lt;*errors.fundamental | 0x14000202c60&gt;{&#xA; msg: &#34;[invalid label&#34;,&#xA; stack: [0x1056103f5, 0x104bb628c, 0x104bb61c8, 0x104ba84d8, 0x104bda0b4],&#xA; },&#xA; msg: &#34;outlier&#34;,&#xA; },&#xA; stack: [0x10560628c, 0x10560545c, 0x10560f968, 0x1055e9c1c, 0x104bda0b4],&#xA; }&#xA; invalid label" type="failed">/package2/a_test.go:52</failure>
</testcase>
</testsuite>
</testsuites>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="5" failures="2" skipped="1">
<testsuite name="github.com/company/package1" tests="0" failures="0" errors="0" id="0" hostname="MBP.local" time="0.000" timestamp="2022-10-13T16:53:32-05:00"></testsuite>
<testsuite name="github.com/company/package2" tests="1" failures="0" errors="0" id="8" hostname="MBP.local" time="0.482" timestamp="2022-10-13T16:53:32-05:00">
<testcase name="TestPackage2" classname="github.com/company/package2" time="0.000"></testcase>
</testsuite>
<testsuite name="github.com/company/package3" tests="1" failures="1" errors="0" id="10" hostname="MBP.local" time="0.835" timestamp="2022-10-13T16:53:32-05:00">
<testcase name="TestPackage3-1" classname="github.com/company/package3" time="0.000">
<failure message="Failed"><![CDATA[Just error here]]></failure>
</testcase>
<testcase name="TestPackage3-2" classname="github.com/company/package3" time="0.160">
<system-out><![CDATA[Just system.out here]]></system-out>
</testcase>
<testcase name="TestPackage3-3" classname="github.com/company/package3" time="0.000">
<skipped message="Skipped"><![CDATA[skipped here]]></skipped>
</testcase>
<testcase name="TestPackage3-4" classname="github.com/company/package3" time="0.000">
<failure message="Failed"></failure>
</testcase>
</testsuite>
</testsuites>