Greetings Robin,

Are you defining both variables in the same User Defined Variable (UDV)
component?  I have found that if you define a variable in a UDV component,
you cannot use it as part of the value of a different variable in that
component.  It appears that variables are not resolvable until the whole
UDV component has been processed

Try adding a second User Defined Variable component and move the definition
of HOSTNAME to that UDV component.

Hope that helps!

-- Scott Dean
   OIT/Shared Services/AIS
   NC State University
   Raleigh, NC    USA



On Thu, Jun 30, 2022 at 12:58 PM Robin D. Wilson <rwils...@gmail.com> wrote:

> I'm trying to setup a test with User Defined Variables.
>
> I want to define a variable "ENV" that specifies whether the test will run
> in the 'dev' environment, or not. (Basically, if set it will modify all of
> the 'hosts' I hit with '-dev' on their hostnames.)
>
> So I want to setup the following type of variables:
>
> ENV = "-dev"
> HOSTNAME = "myhost${ENV}"
>
> Then when the test runs, if "ENV" = "-dev", the HOSTNAME would be
> "myhost-dev", but if I change "ENV" to "" (null), the HOSTNAME would be
> "myhost".
>
> But the User Defined Variables apparently don't use previously set
> variables in the config? Because what I am getting for "HOSTNAME" is
> "myhost${ENV}"...
>
> --
> Robin D. Wilson
> CELL: 512-426-3929
> rwils...@gmail.com
>

Reply via email to