Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hakobera committed Jul 21, 2016
1 parent ff23ed1 commit f3e8528
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion examples/example.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
task :task1 do
param :day, type: :time, auto_bind: true, required: true
param :seed, type: :string, auto_bind: true, required: true

requires :folder

output do
target(:google_drive_file,
name: "test_#{day.strftime('%Y%m%d%H%M')}.txt",
name: "test_#{day.strftime('%Y%m%d%H%M')}_#{seed}.txt",
parents: input.folder_id)
end

Expand Down
6 changes: 3 additions & 3 deletions examples/example2.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
task :task1 do
param :day, type: :time, auto_bind: true, required: true
param :seed, type: :string, auto_bind: true, required: true
requires :folder

output do
target(:google_drive_file,
name: "test_#{day.strftime('%Y%m%d%H%M')}.txt",
name: "test_#{day.strftime('%Y%m%d%H%M')}_#{seed}.txt",
parents: input.folder_id)
end

Expand All @@ -15,6 +16,5 @@
end

task :folder, type: :google_drive_folder do
folder_id "0B7nGp5dHlbK7akttY0haVUNSeGM"
name "folder"
name "existing_folder"
end
2 changes: 1 addition & 1 deletion test/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ class Tumugi::Plugin::GoogleDriveCLITest < Tumugi::Test::TumugiTestCase
data_set
end
test 'success' do |(file, task, worker)|
assert_run_success("examples/#{file}", task, quiet: false, workers: worker, params: { "day" => "2016-06-01" }, config: "./examples/tumugi_config_example.rb")
assert_run_success("examples/#{file}", task, workers: worker, params: { "day" => "2016-06-01", "seed" => worker.to_s }, config: "./examples/tumugi_config_example.rb")
end
end

0 comments on commit f3e8528

Please sign in to comment.