nil.enroll(aetheric_username, quantum_class_id) (adric) wrote,
nil.enroll(aetheric_username, quantum_class_id)
adric

Let's leverage RT's cli to create the test env by script

Some notes on the cli excerpted from my work on a build doc


RTDEBUG2 exported as a shell variable (eg export RTDEBUG=3 ) is handy for debugging RT cli tools. That helped me figure out that I should change a 1 to a 0 at 987,66 (line_num, char) in bin/rt to disable use of proxy environment variables so that requests for 127.0.0.1 don't go to squid pointlessly. That makes rt cli work. Then we can use a config file:

### .rtrc - Request Tracker 3.8.x rt cli configuration ###
server http://127.0.0.1:8888
user root
passwd password

##These specify defaults and more than one queue can be given (by adding a query expression)
##queue helpdesk or queue=support
##query Status != resolved and Owner=myaccount


or the RT env vars (both described in bin/rt help usage) and can wrangle RT internals without using WebUI or Perl, as needed.

Output of bin/rt , create -t queue -e:
# Required: Name

id: queue/new
Name:
Description:
CorrespondAddress:
CommentAddress:
InitialPriority:
FinalPriority:
DefaultDueIn:
, giving us this working recipe for programatically creating Queues:
bin/rt create -t queue set name=NewestQ description="a newer still Q than thee", allowing us to declare:


#!/usr/bin/ruby -w

## Example:
## bin/rt create -t queue set name=NewestQ description="a newer still Q than thee"

test_queues = [
{ :qname => 'External', :qdesc => 'External ticket Queue for Rt testenv' },
{ :qname => 'Helpdesk', :qdesc => 'Helpdesk ticket Queue for Rt testenv' },
{ :qname => 'Oversight', :qdesc => 'Oversight ticket Queue for Rt testenv' },
]

test_queues.each { |tq|
`bin/rt create -t queue set name=\"#{tq[:qname]}\" description=\"#{tq[:qdesc]}\"`
}


and we should easily be able to do the same for some sample users, groups. Unfortunately we can't add scrips or templates this way, yet.


2 http://www.gossamer-threads.com/lists/rt/users/61505?do=post_view_threaded
Tags: cli, request tracker, software testing
Subscribe

  • Weird dreams

    One first with some nearly non-fictional work drama, personality conflict with the Boss. It had something to do with Irish music he was playing…

  • Weird dreams and then loud thoughts when not asleep

    Memories have faded and the plotlines weren't all that cohesive to begin with. Did not seem to get the "it's the last day of school and I haven't…

  • When not asleep..

    I came perilously close to having a Monday this week. I woke up to turn the alarum off at 1805 and then laid back down for a bit, proud that had I…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments