Sha256: 3902676251fe0ba06c6368b412a5fbf5a493b9b2658e23920eb7ce2b7229ff65

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

#
# testing ruote
#
# Fri Sep 16 08:35:21 JST 2011
#

require File.expand_path('../base', __FILE__)


class FtPutDocTest < Test::Unit::TestCase
  include FunctionalBase

  def test_reput_doc

    #@dashboard.noisy = true

    @dashboard.storage.put_msg(
      'reput',
      'doc' => {
        'type' => 'variables',
        '_id' => 'variables',
        'variables' => { 'hello' => 'world' }
      })
    @dashboard.wait_for(1)

    assert_equal 'world', @dashboard.variables['hello']
  end

  def test_re_reput_doc

    #@dashboard.noisy = true

    @dashboard.variables['hello'] = 'world'

    @dashboard.storage.put_msg(
      'reput',
      'doc' => {
        'type' => 'variables',
        '_id' => 'variables',
        'variables' => { 'hello' => 'Welt' }
      })
    @dashboard.wait_for(1)

    assert_equal 'Welt', @dashboard.variables['hello']
  end

  def test_reput_msg

    #@dashboard.noisy = true

    tree = Ruote.define do
      echo 'nada'
    end

    @dashboard.storage.put_msg(
      'reput',
      {
        'msg' => {
          'action' => 'launch',
          'tree' => tree,
          'put_at' => Time.now.to_s,
          'workitem' => { 'fields' => {} }
        }
      })

    @dashboard.wait_for('terminated')

    assert_equal 'nada', @tracer.to_s
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruote-2.3.0.3 test/functional/ft_68_reput.rb
ruote-2.3.0.2 test/functional/ft_68_reput.rb
ruote-2.3.0.1 test/functional/ft_68_reput.rb
ruote-2.3.0 test/functional/ft_68_reput.rb