-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow enforcing password change for a user after reset by admin (root/domain) #12294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a00dd71
ea92759
555b69b
10225ed
c7e48b7
95cba29
71b7b81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| import com.cloud.user.AccountService; | ||
| import com.cloud.user.AccountVO; | ||
| import com.cloud.user.User; | ||
| import com.cloud.user.UserAccount; | ||
| import com.cloud.user.UserVO; | ||
|
|
||
| import org.apache.cloudstack.acl.APIChecker; | ||
|
|
@@ -44,6 +45,7 @@ | |
|
|
||
| import static org.mockito.ArgumentMatchers.any; | ||
| import static org.mockito.ArgumentMatchers.anyList; | ||
| import static org.mockito.ArgumentMatchers.anyLong; | ||
|
|
||
| @RunWith(MockitoJUnitRunner.class) | ||
| public class ApiDiscoveryTest { | ||
|
|
@@ -66,12 +68,17 @@ public class ApiDiscoveryTest { | |
| @InjectMocks | ||
| ApiDiscoveryServiceImpl discoveryServiceSpy; | ||
|
|
||
| @Mock | ||
| UserAccount mockUserAccount; | ||
|
|
||
| @Before | ||
| public void setup() { | ||
| discoveryServiceSpy.s_apiNameDiscoveryResponseMap = apiNameDiscoveryResponseMapMock; | ||
| discoveryServiceSpy._apiAccessCheckers = apiAccessCheckersMock; | ||
|
|
||
| Mockito.when(discoveryServiceSpy._apiAccessCheckers.iterator()).thenReturn(Arrays.asList(apiCheckerMock).iterator()); | ||
| Mockito.when(mockUserAccount.getDetails()).thenReturn(null); | ||
| Mockito.when(accountServiceMock.getUserAccountById(anyLong())).thenReturn(mockUserAccount); | ||
| } | ||
|
Comment on lines
74
to
82
|
||
|
|
||
| private User getTestUser() { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.