Sha256: e5ea27514689a9d80ffe6f717de4008bae28a8bf3c70eacefff4a5981b2c198d
Contents?: true
Size: 1.32 KB
Versions: 5
Compression:
Stored size: 1.32 KB
Contents
# -*- coding: utf-8 -*- require File.expand_path('test_credential_fixture', File.dirname(__FILE__)) require File.expand_path('test_server_fixture', File.dirname(__FILE__)) # 以下のジョブネットについてテンプレートジョブネットや # 実行用ジョブネットを扱うフィクスチャ生成のためのクラスです。 # # in [rjn0001] # (S1) --e1-->(j11)--e2-->(j12)--e3-->(E1) class Rjn0001SimpleJobnetBuilder < JobnetFixtureBuilder include TestCredentialFixture include TestServerFixture DSL = <<-EOS jobnet("rjn0001", :server_name => "test_server1", :credential_name => "test_credential1") do auto_sequence job("j11", "job_test j11") job("j12", "job_test j12") end EOS def create(options = {}) root = new_root_jobnet("rjn0001", { :server_name => test_server1.name, :credential_name => test_credential1.name }.update(options || { })) root.children << Tengine::Job::Start.new root.children << new_script("j11", :script => "job_test j11") root.children << new_script("j12", :script => "job_test j12") root.prepare_end root.build_sequencial_edges root.save! self[:S1] = root.children[0] self[:E1] = root.children[3] self[:e1] = root.edges[0] self[:e2] = root.edges[1] self[:e3] = root.edges[2] root end end
Version data entries
5 entries across 5 versions & 1 rubygems