1
0
-1

Hi,

I have developed a Fluent service and would like to set the test script as "readOnly": false. This allows me to alter the test script for various scenarios, within TM, without having to update the service in the IDE and deploy it for each change.

However, when I deploy the service the 'service-def' file is changed to "readOnly": true.

is there a setting, or combination of settings required to allow this behavior?


Thanks

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hey Mark, in the service ANT file there is a target called validate-service-def which is responsible for enforcing a readOnly = true setting. This is to avoid your deployed assets getting manually modified and out of synch with the IDE code.

      I would not recommend modifying this but if you wish to avoid this process you could remove the validate-service-def target as a dependency on the help-doc target or modify the groovy script in the target body yourself to bypass the change to the readOnly flag.

      1. Mark Murray

        Hi Ben,

        thanks for the explanation.

        I like the approach of enforcing the code to be managed from the IDE, so I was reluctant to make wide spread change; just looking for a one off solution.

        But your comment made me revisit the way I handle this service and the unit test. I resolved this by making use of ```testParams```, that way I can leave the global validate-service-def target as it is and simply change the test parameters as needed. That gives the flexibility I was looking for to cover a few different scenarios with one service and one test script.

        Thanks

      CommentAdd your comment...