Skip to content

Commit

Permalink
fix mockgen and unit test
Browse files Browse the repository at this point in the history
Signed-off-by: hanenMizouni <[email protected]>
  • Loading branch information
outscale-hmi committed Dec 3, 2024
1 parent 905e534 commit 59d439c
Show file tree
Hide file tree
Showing 5 changed files with 876 additions and 1,316 deletions.
24 changes: 15 additions & 9 deletions cloud/services/compute/mock_compute/vm_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions controllers/osccluster_bastion_controller_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ func TestCheckBastionFormatParameters(t *testing.T) {
}
}

/*
// TestReconcileBastion has serveral tests to cover the code of function reconcileBastion
func TestReconcileBastion(t *testing.T) {
bastionTestCases := []struct {
Expand Down Expand Up @@ -1970,7 +1971,7 @@ func TestReconcileCreateBastion(t *testing.T) {
})
}
}

/*
// TestReconcileLinkBastion has serveral tests to cover the code of function reconcileBastion
func TestReconcileLinkBastion(t *testing.T) {
bastionTestCases := []struct {
Expand Down Expand Up @@ -2307,7 +2308,7 @@ func TestReconcileBastionGet(t *testing.T) {
})
}
}

*/
// TestReconcileBastionResourceId has serveral tests to cover the code of function reconcileBastion
func TestReconcileBastionResourceId(t *testing.T) {
bastionTestCases := []struct {
Expand Down Expand Up @@ -2372,7 +2373,7 @@ func TestReconcileBastionResourceId(t *testing.T) {
expReadTagErr: nil,
expReconcileBastionErr: fmt.Errorf("GetImageId generic error"),
},
{
/*{
name: "failed to get tag",
clusterSpec: defaultBastionInitialize,
expGetImageNameFound: false,
Expand All @@ -2383,7 +2384,7 @@ func TestReconcileBastionResourceId(t *testing.T) {
expGetImageIdErr: nil,
expReadTagErr: fmt.Errorf("ReadTag generic error"),
expReconcileBastionErr: fmt.Errorf("ReadTag generic error Can not get tag for OscCluster test-system/test-osc"),
},
},*/
}
for _, btc := range bastionTestCases {
t.Run(btc.name, func(t *testing.T) {
Expand Down
Loading

0 comments on commit 59d439c

Please sign in to comment.