Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void should_return_correct_service_plans() {

var typedQuery =
session.createQuery( "select s.* from AzureServicePlan s where s.id = ? or s.parentId = ?", new TypeReference<Map<String, Object>>() {} );
typedQuery.setParameter( 1, aadPremium.getServicePlanId().toString() );
typedQuery.setParameter( 2, aadPremium.getServicePlanId().toString() );
typedQuery.setParameter( 1, aadPremium.getServicePlanId() );
typedQuery.setParameter( 2, aadPremium.getServicePlanId() );

assertThat( typedQuery.getResultList() ).size().isEqualTo( 60 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void should_return_nsg() {
AzureResourceNetworkSecurityGroup.class, List.of( AzureTestObjects.azureNetworkSecurityGroupSshAllowed(), AzureTestObjects.azureNetworkSecurityGroupRdpAllowed() ) );

var typedQuery =
session.createQuery( "select nsg.payload.id from AzureNetworkSecurityGroup nsg where exists (select 1 from unnest(nsg.payload.securityRules) as r where r.direction = 'Inbound' and r.access = 'Allow' and r.destinationPortRange = 3389 )", new TypeReference<Map<String, Object>>() {} );
session.createQuery( "select nsg.payload.id from AzureNetworkSecurityGroup nsg where exists (select 1 from unnest(nsg.payload.securityRules) as r where r.direction = 'Inbound' and r.access = 'Allow' and r.destinationPortRange = '3389' )", new TypeReference<Map<String, Object>>() {} );

assertThat( typedQuery.getResultList() ).extracting( result -> result.get( "id" ) ).containsExactly( "/subscriptions/e864bc3e-3581-473d-bc31-757e489cf8fa/resourceGroups/virtualmachines/providers/Microsoft.Network/networkSecurityGroups/windows-vm-no-automatic-patching-standard-security-type-nsg" );
}
Expand Down
Loading