Restore commented unit test TestDeleteLogicalCloud 49/113749/1
authorIgor D.C <igor.duarte.cardoso@intel.com>
Thu, 8 Oct 2020 18:44:14 +0000 (18:44 +0000)
committerIgor D.C <igor.duarte.cardoso@intel.com>
Sat, 10 Oct 2020 05:12:08 +0000 (05:12 +0000)
commit5e013d0d327dee9f5cd53fee6ec8d2d2593e0258
tree2c50e2e4341dd302ddb1091dbf23171c2d7a43fc
parentedaf4416c5002254b60199a0b9710ebb23ccdf7b
Restore commented unit test TestDeleteLogicalCloud

Restore the previously commented-out unit test TestDeleteLogicalCloud.
That test was disabled due to a failure introduced by interacting with
AppContext for the first time in module/logicalcloud.go and it not
being ready to do so.

This commit restores it and modifies code so dependent mocks can plug
in correctly. This was done in order to keep testing the code that was
previously being tested, not so much to add additional coverage.

Although it would be a significant undertaking, the different types and
interfaces in pkg/module should be redesigned to achieve better
decoupling and thus make unit testing more straightforward.

Issue-ID: MULTICLOUD-1143
Change-Id: I1e6b7bb9111fc6883f0c9cee887329a9e0b27fbd
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
src/dcm/api/logicalCloudHandler.go
src/dcm/pkg/module/apply.go
src/dcm/pkg/module/cluster.go
src/dcm/pkg/module/logicalcloud.go
src/dcm/pkg/module/logicalcloud_test.go