Make the deploy option explicitly set a test level

Issue #1357 resolved
Brian Broughton created an issue

Please add a test level option to the Deploy Modified Metadata command.

Comments (6)

  1. Scott Wells repo owner

    Okay, here's a test build that explicitly sets the test level for the metadata API deployment request based on the org type. If it's a production org, it'll run all local tests; if it's not a production org, it'll run no tests.

    IC decides whether it's a production org based on two settings:

    1. Under the Validation and Deployment settings tab there's a checkbox called Use Salesforce-reported organization type that, when checked, tells IC to respect the...well...type that as which the org reports itself. If unchecked, it...
    2. ...uses the Organization type value from the connection itself.

    To install the build just download the attached archive--don't extract it--and use Settings/Preferences>Plugins>Install plugin from disk which is found under the gear drop-down these days, then restart the IDE.

    Let me know whether this resolves the issue for you or not, and of course whether it causes any other issues (it shouldn't, but I've gotten to where I'm not brave enough to say that except parenthetically!).

  2. Brian Broughton reporter

    Hi Scott,

    I’m afraid this build does not solve my issue. Please see the error message below. I did verify that the “Use Salesforce-reported organization type” setting is checked.

    Status: 1
    Name: sf:INVALID_OPERATION
    Message: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations

    Thank you,

    Brian

  3. Scott Wells repo owner

    Brian, can you uncheck that option and make sure that the connection itself is set to a Organization type=Production? Perhaps the org is just reporting the wrong value.

  4. Brian Broughton reporter

    Hi Scott,

    I’m finally back to working. What I ended up having to do was to uninstall the IC plugin, then delete all of my org connections and re-create them. After taking those steps, I’m back to being able to deploy to production.

    Thanks,

    Brian

  5. Scott Wells repo owner

    Brian, that's really strange. The only thing that persistent that might have come into play would be the organization type setting for your connections, and that should be updated persistently as you update it in the UI. I'm very surprised that you had to go through all of that to get this into a working state. If you see this behavior again, please let me know and I'll likely need to get some additional diagnostic info from you...not just logs but also config files.

  6. Scott Wells repo owner

    This has been a configurable option in the build options dialog for quite a bit. Please let me know if there's still some unsupported or broken use case.

  7. Log in to comment