apex-enterprise-patterns / fflib-apex-mocks

An Apex mocking framework for true unit testing in Salesforce, with Stub API support
BSD 3-Clause "New" or "Revised" License
423 stars 214 forks source link

Impossible to deploy from master due to two unit tests are failing #100

Closed lopezfra closed 4 years ago

lopezfra commented 4 years ago

I am trying to deploy all the classes from the master branch to a production org, however it is not possible due to two unit test are failing. I tried also in a sdbx with same result.

Screen Shot 2020-09-28 at 18 52 05
daveespo commented 4 years ago

This ticket is erroneously filed in the fflib-apex-mocks repo -- the unit test failure you're seeing is from fflib_SObjectUnitOfWorkTest which is in fflib-apex-common

However, before we go file the ticket over there -- do you have Platform Encryption (Shield) enabled on Opportunity in your org?

The query to retrieve Opportunities for that assertion use a SOQL query that depends on a LIKE clause:

[select Id, Name, (Select Id from OpportunityLineItems) from Opportunity where Name like :filter order by Name];

If that's the case, then it's probably a flavor of the same issue reported in https://github.com/apex-enterprise-patterns/fflib-apex-common/issues/194

lopezfra commented 4 years ago

true @daveespo , I created the issue in the wrong repo...sorry for that. Nup, If I am right, Platform Encryption Shield is not activated in the org...

ImJohnMDaniel commented 4 years ago

@lopezfra -- I just setup a clean scratch org and deployed the fflib-apex-mocks and fflib-apex-common code from the current master branches. All of the unit tests passed.

So, whatever the issue is, I suspect that it is environmental.

I would recommend that you open a new ticket on the fflib-apex-common project issues and we can figure this out from there.

lopezfra commented 4 years ago

fully agree @ImJohnMDaniel ,closing this one to avoid any misunderstanding and I will open a new one in the right repo. Thanks!