Skip to content

Commit

Permalink
Improve test: add condition for customer-creation-required tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiLandiak committed May 21, 2024
1 parent 15ba912 commit 8aa8851
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.springframework.beans.factory.annotation.Autowired;
import org.testcontainers.shaded.org.awaitility.Awaitility;
import org.thingsboard.common.util.ThingsBoardExecutors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.google.common.util.concurrent.Futures;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -197,6 +198,7 @@ void givenSupportedOriginatorTypeAndCustomerTitle_whenOnMsg_thenVerify(EntityTyp
verifyNoMoreInteractions(ctxMock);
}

@Disabled("Customers are not allowed to be created on the edge")
@ParameterizedTest
@MethodSource("givenSupportedOriginatorTypeAndCustomerTitle_whenOnMsg_thenVerify")
void givenSupportedOriginatorTypeAndCustomerTitle_whenOnMsg_thenVerifyCustomerCreatedAndSuccessOutMsg(EntityType type, String customerTitle) throws TbNodeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ private static Stream<Arguments> givenSupportedEntityType_whenOnMsg_thenVerifyCo
private static Stream<Arguments> givenSupportedEntityTypeToCreateEntityIfNotExists_whenOnMsg_thenVerifyConditions() {
return Stream.of(
Arguments.of(new Device(deviceId)),
Arguments.of(new Asset(assetId)),
Arguments.of(new Asset(assetId))
/* edge-only: customers are not allowed to be created on the edge
Arguments.of(new Customer(customerId))
*/
);
}

Expand Down

0 comments on commit 8aa8851

Please sign in to comment.