Skip to content

Commit

Permalink
OZ-560: Fix Unit test and docker-publish CI Job
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke committed Oct 7, 2024
1 parent 13f6f97 commit b5e959c
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 184 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: mekomsolutions/shared-github-workflow/.github/workflows/docker-build-publish.yml@main
with:
download-artifacts: false
image-version: "latest"
image-name: "container-to-consul"
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_REGISTRY_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion coverage/coverage.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">94.83% </span>
<span class="strong">92.7% </span>
<span class="quiet">Statements</span>
<span class='fraction'>165/174</span>
<span class='fraction'>165/178</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">86.15% </span>
<span class="quiet">Branches</span>
<span class='fraction'>56/65</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">96.67% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>29/30</span>
<span class='fraction'>29/29</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">94.77% </span>
<span class="strong">92.61% </span>
<span class="quiet">Lines</span>
<span class='fraction'>163/172</span>
<span class='fraction'>163/176</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -73,15 +73,15 @@ <h1>

<tr>
<td class="file high" data-value="lib/consul/"><a href="lib/consul/index.html">lib/consul/</a></td>
<td data-value="94.44" class="pic high"><div class="chart"><div class="cover-fill" style="width: 94%;"></div><div class="cover-empty" style="width:6%;"></div></div></td>
<td data-value="94.44" class="pct high">94.44%</td>
<td data-value="36" class="abs high">34/36</td>
<td data-value="85" class="pic high"><div class="chart"><div class="cover-fill" style="width: 85%;"></div><div class="cover-empty" style="width:15%;"></div></div></td>
<td data-value="85" class="pct high">85%</td>
<td data-value="40" class="abs high">34/40</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="12" class="abs high">10/12</td>
<td data-value="93.75" class="pct high">93.75%</td>
<td data-value="16" class="abs high">15/16</td>
<td data-value="94.44" class="pct high">94.44%</td>
<td data-value="36" class="abs high">34/36</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="85" class="pct high">85%</td>
<td data-value="40" class="abs high">34/40</td>
</tr>

<tr>
Expand All @@ -103,7 +103,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/consul/catalog.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
28 changes: 14 additions & 14 deletions coverage/lcov-report/lib/consul/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">94.44% </span>
<span class="strong">85% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/36</span>
<span class='fraction'>34/40</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Branches</span>
<span class='fraction'>10/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.75% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>15/16</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">94.44% </span>
<span class="strong">85% </span>
<span class="quiet">Lines</span>
<span class='fraction'>34/36</span>
<span class='fraction'>34/40</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -73,15 +73,15 @@ <h1>

<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="95.65" class="pic high"><div class="chart"><div class="cover-fill" style="width: 95%;"></div><div class="cover-empty" style="width:5%;"></div></div></td>
<td data-value="95.65" class="pct high">95.65%</td>
<td data-value="23" class="abs high">22/23</td>
<td data-value="81.48" class="pic high"><div class="chart"><div class="cover-fill" style="width: 81%;"></div><div class="cover-empty" style="width:19%;"></div></div></td>
<td data-value="81.48" class="pct high">81.48%</td>
<td data-value="27" class="abs high">22/27</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="95.65" class="pct high">95.65%</td>
<td data-value="23" class="abs high">22/23</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
<td data-value="81.48" class="pct high">81.48%</td>
<td data-value="27" class="abs high">22/27</td>
</tr>

<tr>
Expand All @@ -103,7 +103,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
52 changes: 41 additions & 11 deletions coverage/lcov-report/lib/consul/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">95.65% </span>
<span class="strong">81.48% </span>
<span class="quiet">Statements</span>
<span class='fraction'>22/23</span>
<span class='fraction'>22/27</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Branches</span>
<span class='fraction'>9/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/8</span>
<span class='fraction'>7/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95.65% </span>
<span class="strong">81.48% </span>
<span class="quiet">Lines</span>
<span class='fraction'>22/23</span>
<span class='fraction'>22/27</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -112,7 +112,17 @@ <h1>
67
68
69
70</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
70
71
72
73
74
75
76
77
78
79
80</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
Expand All @@ -136,10 +146,20 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -204,9 +224,19 @@ <h1>
method,
baseURL: `http://${this.host}:${this.port}`,
url: `${uri}`,
transformResponse: [<span class="fstat-no" title="function not covered" >function transformResponse(data) {</span>
<span class="cstat-no" title="statement not covered" > return JSON.parse(data);</span>
}]
transformResponse: [
(data) =&gt; {
<span class="cstat-no" title="statement not covered" > let resp;</span>
<span class="cstat-no" title="statement not covered" > try {</span>
<span class="cstat-no" title="statement not covered" > resp = JSON.parse(data);</span>
} catch (error) {
<span class="cstat-no" title="statement not covered" > throw Error(</span>
`[requestClient] Error parsingJSON data ${error}`
);
}
<span class="cstat-no" title="statement not covered" > return resp;</span>
},
],
};
&nbsp;
if (body) {
Expand Down Expand Up @@ -256,7 +286,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/consul/kv.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
7 changes: 2 additions & 5 deletions coverage/lcov-report/lib/container-to-consul.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@ <h1>
273
274
275
276
277</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
276</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">22×</span>
<span class="cline-any cline-yes">22×</span>
Expand Down Expand Up @@ -390,7 +389,6 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -666,7 +664,6 @@ <h1>
});
}));
})
// register all containers
.then(() =&gt; this.docker.containers())
.then(containers =&gt; this.registerContainers(containers))
.catch(error =&gt; {
Expand Down Expand Up @@ -877,7 +874,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/docker.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/errors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/errors/skipError.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/lib/typedefs.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Sep 20 2024 07:58:24 GMT+0300 (East Africa Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 07 2024 12:49:06 GMT+0300 (East Africa Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
Loading

0 comments on commit b5e959c

Please sign in to comment.