Skip to content

Commit

Permalink
#221 Update dependencies, regenerate mocks and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jelemux committed Dec 13, 2024
1 parent b139cb0 commit bfdbf70
Show file tree
Hide file tree
Showing 14 changed files with 628 additions and 140 deletions.
6 changes: 3 additions & 3 deletions controllers/doguSupportManager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func Test_doguSupportManager_updateDeployment(t *testing.T) {
},
}

sut.podTemplateGenerator.EXPECT().GetPodTemplate(ldapCr, ldap).Return(&podSpec, nil)
sut.podTemplateGenerator.EXPECT().GetPodTemplate(testCtx, ldapCr, ldap).Return(&podSpec, nil)

// when
err = sut.supportManager.updateDeployment(testCtx, ldapCr, deployment)
Expand Down Expand Up @@ -204,7 +204,7 @@ func Test_doguSupportManager_updateDeployment(t *testing.T) {
ldapCr := readDoguCr(t, ldapCrBytes)
sut.localDoguFetcherMock.EXPECT().FetchInstalled(testCtx, "ldap").Return(ldap, nil)
podSpec := corev1.PodTemplateSpec{Spec: corev1.PodSpec{}}
sut.podTemplateGenerator.EXPECT().GetPodTemplate(ldapCr, ldap).Return(&podSpec, nil)
sut.podTemplateGenerator.EXPECT().GetPodTemplate(testCtx, ldapCr, ldap).Return(&podSpec, nil)

// when
err := sut.supportManager.updateDeployment(testCtx, ldapCr, &appsv1.Deployment{})
Expand All @@ -230,7 +230,7 @@ func Test_doguSupportManager_HandleSupportMode(t *testing.T) {
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Image: "official/ldap:2.4.48-4"}, {Image: "other:1.2.3"}}}}

sut.podTemplateGenerator.EXPECT().GetPodTemplate(ldapCr, ldap).Return(&podTemplateSpec, nil)
sut.podTemplateGenerator.EXPECT().GetPodTemplate(testCtx, ldapCr, ldap).Return(&podTemplateSpec, nil)

deployment := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: "ldap", Namespace: namespace},
Spec: appsv1.DeploymentSpec{
Expand Down
81 changes: 65 additions & 16 deletions controllers/health/mock_clientSet_test.go

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

61 changes: 61 additions & 0 deletions controllers/health/mock_podInterface_test.go

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

81 changes: 65 additions & 16 deletions controllers/mock_ClientSet_test.go

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

Loading

0 comments on commit bfdbf70

Please sign in to comment.