Browse Source
Merge pull request #11195 from AndriiLandiak/fix/edge-oauth-test
Fix OAuth2EdgeTest
pull/11199/head
Sergey Matvienko
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
1 additions and
7 deletions
-
application/src/test/java/org/thingsboard/server/edge/NotificationEdgeTest.java
-
application/src/test/java/org/thingsboard/server/edge/OAuth2EdgeTest.java
|
|
|
@ -18,7 +18,6 @@ package org.thingsboard.server.edge; |
|
|
|
import com.google.protobuf.AbstractMessage; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Test; |
|
|
|
import org.springframework.test.context.TestPropertySource; |
|
|
|
import org.thingsboard.common.util.JacksonUtil; |
|
|
|
import org.thingsboard.server.common.data.StringUtils; |
|
|
|
import org.thingsboard.server.common.data.notification.NotificationDeliveryMethod; |
|
|
|
|
|
|
|
@ -59,12 +59,7 @@ public class OAuth2EdgeTest extends AbstractEdgeTest { |
|
|
|
oAuth2Info.setEnabled(false); |
|
|
|
oAuth2Info.setEdgeEnabled(false); |
|
|
|
doPost("/api/oauth2/config", oAuth2Info, OAuth2Info.class); |
|
|
|
Assert.assertTrue(edgeImitator.waitForMessages()); |
|
|
|
latestMessage = edgeImitator.getLatestMessage(); |
|
|
|
Assert.assertTrue(latestMessage instanceof OAuth2UpdateMsg); |
|
|
|
oAuth2UpdateMsg = (OAuth2UpdateMsg) latestMessage; |
|
|
|
result = JacksonUtil.fromString(oAuth2UpdateMsg.getEntity(), OAuth2Info.class, true); |
|
|
|
Assert.assertEquals(oAuth2Info, result); |
|
|
|
Assert.assertFalse(edgeImitator.waitForMessages(5)); |
|
|
|
|
|
|
|
edgeImitator.ignoreType(OAuth2UpdateMsg.class); |
|
|
|
loginTenantAdmin(); |
|
|
|
|