<commit_before>require 'spec_helper'

describe docker_container('marathon') do
  it { should be_running }
  # it { should have_volume('/tmp/docker.sock','/var/run/docker.sock') }
  # it { should have_volume('/store','/etc/marathon/store') }
end

describe port(8080) do
  it { should be_listening }
end

describe command("/usr/local/bin/marathon-wait-for-listen.sh") do
  its(:exit_status) { should eq 0 }
end

describe port(8080) do
  it { should be_listening }
end

describe service('marathon') do
  it { should be_running.under('upstart') }
end

describe command("curl -s -XPOST 127.0.0.1:8080/v2/apps -d@spec/marathon/sample.json -H \"Content-Type: application/json\" && sleep 10") do
  its(:exit_status) { should eq 0 }
  it {
    sleep(240) #Wait for the task to execute
  }
end

describe command("curl -s 127.0.0.1:8080/v2/apps/serverspecs-app") do
  its(:stdout) { should match '.*"id":"/serverspecs-app".*' }<commit_msg>increase sleep to 240<commit_after>require 'spec_helper'

describe docker_container('marathon') do
  it { should be_running }
  # it { should have_volume('/tmp/docker.sock','/var/run/docker.sock') }
  # it { should have_volume('/store','/etc/marathon/store') }
end

describe port(8080) do
  it { should be_listening }
end

describe command("/usr/local/bin/marathon-wait-for-listen.sh") do
  its(:exit_status) { should eq 0 }
end

describe port(8080) do
  it { should be_listening }
end

describe service('marathon') do
  it { should be_running.under('upstart') }
end

describe command("curl -s -XPOST 127.0.0.1:8080/v2/apps -d@spec/marathon/sample.json -H \"Content-Type: application/json\" && sleep 240") do
  its(:exit_status) { should eq 0 }
end

describe command("curl -s 127.0.0.1:8080/v2/apps/serverspecs-app") do
  its(:stdout) { should match '.*"id":"/serverspecs-app".*' }
{'fraction_non_alphanumeric': 0.15865118850193477, 'fraction_numerical': 0.04145936981757877, 'mean_word_length': 4.2011494252873565, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '654605', 'n_tokens_mistral': 716, 'n_tokens_neox': 644, 'n_words': 151}