Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cap10morgan/6186697 to your computer and use it in GitHub Desktop.
Save cap10morgan/6186697 to your computer and use it in GitHub Desktop.
$ lein test pallet.actions.direct.remote-file-test
lein test pallet.actions.direct.remote-file-test
17:19:04.749 [operate-8] ERROR pallet.execute - localhost #> remote-file /tmp/pallet_4033649009093972374tmp : FAIL
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:454)
local-file url
expected: (nil? (phase-errors op))
actual: (not (nil? ({:context nil, :phase :phase17280, :target {:phases {:phase17280 #<remote_file_test$fn__12388$fn__12649$fn__13007$fn__13009 pallet.actions.direct.remote_file_test$fn__12388$fn__12649$fn__13007$fn__13009@20434b2c>, :pallet/os #<api$lift_STAR_$fn__11812 pallet.api$lift_STAR_$fn__11812@21fc4640>}, :group-name :local, :default-phases [:configure], :group-names #{:local}, :node loca :ubuntu true public: 127.0.0.1 private: null localhost}, :action-symbol pallet.actions-impl/remote-file-action, :error {:server "localhost", :type :pallet-script-excution-error, :message "localhost Error executing script :err chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\n#> remote-file /tmp/pallet_4033649009093972374tmp : FAIL\n", :exit 1, :out "remote-file /tmp/pallet_4033649009093972374tmp...\n", :err "chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\n#> remote-file /tmp/pallet_4033649009093972374tmp : FAIL\n"}, :err "chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\n#> remote-file /tmp/pallet_4033649009093972374tmp : FAIL\n", :plan-state {:host {"localhost" {:pallet/os {nil {:context "os: ", :action-symbol clj-action11505, :id "Ubuntu", :release "12.04", :mach "x86_64", :rev "3.2.0-23-generic", :os "Linux", :os-family :ubuntu, :os-version "12.04"}}}}, :pallet.action/action-options {}}, :flags #{}, :exit 1, :script "#!/usr/bin/env bash\nmkdir -p /home/vagrant || exit 1\ncd /home/vagrant\nset -h\necho 'remote-file /tmp/pallet_4033649009093972374tmp...';\n{\ndirpath=$(dirname /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new)\ntemplatepath=$(dirname $(readlink -f /tmp/pallet_4033649009093972374tmp))\nmkdir -p ${dirpath} || exit 1\nwhile [ \"/\" != \"${templatepath}\" ] ;do d=${dirpath} && t=${templatepath} && dirpath=$(dirname ${dirpath}) && templatepath=$(dirname ${templatepath}) && chgrp $(stat -c%g ${t}) ${d} || : && chmod $(stat -c%a ${t}) ${d} || : && chown $(stat -c%u ${t}) ${d} || : ; done && if hash curl 2>&-; then curl -o \"/var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\" --retry 5 --silent --show-error --fail --location \"file:///tmp/pallet_6648371593665542019tmp\";else\nif hash wget 2>&-; then wget -O \"/var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\" --tries 5 --no-verbose --progress=dot:mega \"file:///tmp/pallet_6648371593665542019tmp\";else\necho No download utility available\nexit 1\nfi\nfi && filediff= && if [ -e /tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp ]; then\ndiff -u /tmp/pallet_4033649009093972374tmp /var/lib/pallet/tmp/pallet_4033649009093972374tmp\nfilediff=$?\nfi && md5diff= && if [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5 ]; then\n( cd $(dirname /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) && md5sum --quiet --check $(basename /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) )\nmd5diff=$?\nfi && contentdiff= && if [ -e /tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new ]; then\ndiff -u /tmp/pallet_4033649009093972374tmp /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\ncontentdiff=$?\nfi && errexit=0 && if [ \"${filediff}\" == \"1\" ]; then\necho Existing file did not match the pallet master copy: FAIL\nerrexit=1\nfi && if [ \"${md5diff}\" == \"1\" ]; then\necho Existing content did not match md5: FAIL\nerrexit=1\nfi && [ \"${errexit}\" == \"0\" ] && if ! { [ \"${contentdiff}\" == \"0\" ]; } && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new ]; then\ncp -f --backup=\"numbered\" /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new /var/lib/pallet/tmp/pallet_4033649009093972374tmp\nmv -f /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new /tmp/pallet_4033649009093972374tmp\nfi && chmod 0666 /tmp/pallet_4033649009093972374tmp && (cp=$(readlink -f /tmp/pallet_4033649009093972374tmp) && cd $(dirname ${cp}) && md5sum $(basename ${cp})\n)>/var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5 && echo MD5 sum is $(cat /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) && ls -t /tmp/pallet_4033649009093972374tmp.~[0-9]*~ 2> /dev/null | tail -n \"+6\" | xargs \\\n rm --force\n } || { echo '#> remote-file /tmp/pallet_4033649009093972374tmp : FAIL'; exit 1;} >&2 \necho '#> remote-file /tmp/pallet_4033649009093972374tmp : SUCCESS'\n\nexit $?", :target-type nil, :flag-values {}, :out "remote-file /tmp/pallet_4033649009093972374tmp...\n"})))
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:456)
local-file url
expected: (= "urltext" (slurp (.getPath target-tmp)))
actual: (not (= "urltext" "text"))
17:19:08.030 [operate-8] ERROR pallet.execute - localhost #> remote-file /tmp/pallet_4033649009093972374tmp : FAIL
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:470)
local-file url with md5
expected: (= "urlmd5text" (slurp (.getPath target-tmp)))
actual: (not (= "urlmd5text" "text"))
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:497)
local-file url with md5 urls
expected: (nil? (phase-errors op))
actual: (not (nil? ({:context nil, :phase :phase17670, :target {:phases {:phase17670 #<remote_file_test$fn__12388$fn__12649$fn__13083$fn__13085 pallet.actions.direct.remote_file_test$fn__12388$fn__12649$fn__13083$fn__13085@2eb282d0>, :pallet/os #<api$lift_STAR_$fn__11812 pallet.api$lift_STAR_$fn__11812@49aa3da3>}, :group-name :local, :default-phases [:configure], :group-names #{:local}, :node loca :ubuntu true public: 127.0.0.1 private: null localhost}, :action-symbol pallet.actions-impl/remote-file-action, :error {:server "localhost", :type :pallet-script-excution-error, :message "localhost Error executing script :err chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_437240514852176457tmp/pallet_4033649009093972374tmp.md5: Unsupported scheme `file'.\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\nmd5sum: pallet_4033649009093972374tmp.md5: no properly formatted MD5 checksum lines found\n", :exit 1, :out "remote-file /tmp/pallet_4033649009093972374tmp...\n0a1\n> 1cb251ec0d568de6a929b520c4aed8d1 pallet_4033649009093972374tmp\nDownload of file:///tmp/pallet_6648371593665542019tmp failed to match md5\n", :err "chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_437240514852176457tmp/pallet_4033649009093972374tmp.md5: Unsupported scheme `file'.\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\nmd5sum: pallet_4033649009093972374tmp.md5: no properly formatted MD5 checksum lines found\n"}, :err "chgrp: changing group of `/var/lib/pallet/tmp': Operation not permitted\nchown: changing ownership of `/var/lib/pallet/tmp': Operation not permitted\nfile:///tmp/pallet_437240514852176457tmp/pallet_4033649009093972374tmp.md5: Unsupported scheme `file'.\nfile:///tmp/pallet_6648371593665542019tmp: Unsupported scheme `file'.\nmd5sum: pallet_4033649009093972374tmp.md5: no properly formatted MD5 checksum lines found\n", :plan-state {:host {"localhost" {:pallet/os {nil {:context "os: ", :action-symbol clj-action11505, :id "Ubuntu", :release "12.04", :mach "x86_64", :rev "3.2.0-23-generic", :os "Linux", :os-family :ubuntu, :os-version "12.04"}}}}, :pallet.action/action-options {}}, :flags #{}, :exit 1, :script "#!/usr/bin/env bash\nmkdir -p /home/vagrant || exit 1\ncd /home/vagrant\nset -h\necho 'remote-file /tmp/pallet_4033649009093972374tmp...';\n{\ndirpath=$(dirname /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new)\ntemplatepath=$(dirname $(readlink -f /tmp/pallet_4033649009093972374tmp))\nmkdir -p ${dirpath} || exit 1\nwhile [ \"/\" != \"${templatepath}\" ] ;do d=${dirpath} && t=${templatepath} && dirpath=$(dirname ${dirpath}) && templatepath=$(dirname ${templatepath}) && chgrp $(stat -c%g ${t}) ${d} || : && chmod $(stat -c%a ${t}) ${d} || : && chown $(stat -c%u ${t}) ${d} || : ; done && tmpdir=\"$(mktemp -d --tmpdir rfXXXXX)\" && basefile=\"${tmpdir}/$(basename /tmp/pallet_4033649009093972374tmp)\" && newmd5path=\"${basefile}.md5\" && if hash curl 2>&-; then curl -o \"${newmd5path}\" --retry 5 --silent --show-error --fail --location \"file:///tmp/pallet_437240514852176457tmp/pallet_4033649009093972374tmp.md5\";else\nif hash wget 2>&-; then wget -O \"${newmd5path}\" --tries 5 --no-verbose --progress=dot:mega \"file:///tmp/pallet_437240514852176457tmp/pallet_4033649009093972374tmp.md5\";else\necho No download utility available\nexit 1\nfi\nfi && if egrep '^[a-fA-F0-9]+$' ${newmd5path}; then echo \" $(basename ${newmd5path} | sed -e s/.md5//)\" >> ${newmd5path};fi\nsed -i -e \"s_/.*/\\(..*\\)_\\1_\" ${newmd5path} && if ! { [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5 ]; } || ! { diff ${newmd5path} /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5; }; then\nif hash curl 2>&-; then curl -o \"/var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\" --retry 5 --silent --show-error --fail --location \"file:///tmp/pallet_6648371593665542019tmp\";else\nif hash wget 2>&-; then wget -O \"/var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\" --tries 5 --no-verbose --progress=dot:mega \"file:///tmp/pallet_6648371593665542019tmp\";else\necho No download utility available\nexit 1\nfi\nfi\nln /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new ${basefile}\nif ! ( ( cd $(dirname ${newmd5path}) && md5sum --quiet --check $(basename ${newmd5path}) ) ); then\necho Download of file:///tmp/pallet_6648371593665542019tmp failed to match md5\nrm --recursive --force ${tmpdir}\nexit 1\nfi\nfi && rm --recursive --force ${tmpdir} && filediff= && if [ -e /tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp ]; then\ndiff -u /tmp/pallet_4033649009093972374tmp /var/lib/pallet/tmp/pallet_4033649009093972374tmp\nfilediff=$?\nfi && md5diff= && if [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5 ]; then\n( cd $(dirname /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) && md5sum --quiet --check $(basename /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) )\nmd5diff=$?\nfi && contentdiff= && if [ -e /tmp/pallet_4033649009093972374tmp ] && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new ]; then\ndiff -u /tmp/pallet_4033649009093972374tmp /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new\ncontentdiff=$?\nfi && errexit=0 && if [ \"${filediff}\" == \"1\" ]; then\necho Existing file did not match the pallet master copy: FAIL\nerrexit=1\nfi && if [ \"${md5diff}\" == \"1\" ]; then\necho Existing content did not match md5: FAIL\nerrexit=1\nfi && [ \"${errexit}\" == \"0\" ] && if ! { [ \"${contentdiff}\" == \"0\" ]; } && [ -e /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new ]; then\ncp -f --backup=\"numbered\" /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new /var/lib/pallet/tmp/pallet_4033649009093972374tmp\nmv -f /var/lib/pallet/tmp/pallet_4033649009093972374tmp.new /tmp/pallet_4033649009093972374tmp\nfi && chmod 0666 /tmp/pallet_4033649009093972374tmp && (cp=$(readlink -f /tmp/pallet_4033649009093972374tmp) && cd $(dirname ${cp}) && md5sum $(basename ${cp})\n)>/var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5 && echo MD5 sum is $(cat /var/lib/pallet/tmp/pallet_4033649009093972374tmp.md5) && ls -t /tmp/pallet_4033649009093972374tmp.~[0-9]*~ 2> /dev/null | tail -n \"+6\" | xargs \\\n rm --force\n } || { echo '#> remote-file /tmp/pallet_4033649009093972374tmp : FAIL'; exit 1;} >&2 \necho '#> remote-file /tmp/pallet_4033649009093972374tmp : SUCCESS'\n\nexit $?", :target-type nil, :flag-values {}, :out "remote-file /tmp/pallet_4033649009093972374tmp...\n0a1\n> 1cb251ec0d568de6a929b520c4aed8d1 pallet_4033649009093972374tmp\nDownload of file:///tmp/pallet_6648371593665542019tmp failed to match md5\n"})))
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:499)
local-file url with md5 urls
expected: (complete? op)
actual: (not (complete? #<Operation dofsm-lift: failed :step-failed :running :step-completed :running :step-completed :running :step-completed :running :step-completed :running :init>))
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:500)
local-file url with md5 urls
expected: (not (failed? op))
actual: (not (not true))
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
FAIL in (remote-file-test) (remote_file_test.clj:501)
local-file url with md5 urls
expected: (.canRead target-tmp)
actual: false
lein test :only pallet.actions.direct.remote-file-test/remote-file-test
ERROR in (remote-file-test) (FileInputStream.java:-2)
local-file url with md5 urls
expected: (= "urlmd5urltext" (slurp (.getPath target-tmp)))
actual: java.io.FileNotFoundException: /tmp/pallet_4033649009093972374tmp (No such file or directory)
at java.io.FileInputStream.open (FileInputStream.java:-2)
java.io.FileInputStream.<init> (FileInputStream.java:138)
clojure.java.io/fn (io.clj:233)
clojure.java.io$fn__8265$G__8230__8272.invoke (io.clj:73)
clojure.java.io/fn (io.clj:262)
clojure.java.io$fn__8265$G__8230__8272.invoke (io.clj:73)
clojure.java.io/fn (io.clj:169)
clojure.java.io$fn__8239$G__8234__8246.invoke (io.clj:73)
clojure.java.io$reader.doInvoke (io.clj:106)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invoke (core.clj:603)
clojure.core$slurp.doInvoke (core.clj:6126)
clojure.lang.RestFn.invoke (RestFn.java:410)
pallet.actions.direct.remote_file_test$fn__12388$fn__12649$fn__13083.invoke (remote_file_test.clj:502)
pallet.actions.direct.remote_file_test$fn__12388$fn__12649.invoke (remote_file_test.clj:471)
pallet.actions.direct.remote_file_test/fn (remote_file_test.clj:286)
clojure.test$test_var$fn__6926.invoke (test.clj:701)
clojure.test$test_var.invoke (test.clj:701)
user$eval75$test_var_with_selector__84.invoke (NO_SOURCE_FILE:1)
clojure.lang.AFn.applyToHelper (AFn.java:163)
clojure.lang.AFn.applyTo (AFn.java:151)
clojure.core$apply.invoke (core.clj:603)
leiningen.core.injected$compose_hooks$fn__13.doInvoke (NO_SOURCE_FILE:1)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:601)
leiningen.core.injected$run_hooks.invoke (NO_SOURCE_FILE:1)
leiningen.core.injected$prepare_for_hooks$fn__18$fn__19.doInvoke (NO_SOURCE_FILE:1)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.test$test_all_vars$fn__6930$fn__6937.invoke (test.clj:717)
clojure.test$default_fixture.invoke (test.clj:671)
clojure.test$test_all_vars$fn__6930.invoke (test.clj:717)
pallet.common.logging.logback$logging_threshold_fixture$fn__1139.invoke (logback.clj:72)
clojure.test$compose_fixtures$fn__6920$fn__6921.invoke (test.clj:678)
pallet.test_utils$with_bash_script_language.invoke (test_utils.clj:89)
clojure.test$compose_fixtures$fn__6920$fn__6921.invoke (test.clj:678)
pallet.test_utils$with_ubuntu_script_template.invoke (test_utils.clj:83)
clojure.test$compose_fixtures$fn__6920$fn__6921.invoke (test.clj:678)
clojure.test$default_fixture.invoke (test.clj:671)
clojure.test$compose_fixtures$fn__6920.invoke (test.clj:678)
clojure.test$compose_fixtures$fn__6920.invoke (test.clj:678)
clojure.test$compose_fixtures$fn__6920.invoke (test.clj:678)
clojure.test$test_all_vars.invoke (test.clj:713)
clojure.test$test_ns.invoke (test.clj:736)
clojure.core$map$fn__4087.invoke (core.clj:2434)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:60)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1633)
clojure.lang.RestFn.applyTo (RestFn.java:130)
clojure.core$apply.invoke (core.clj:603)
clojure.test$run_tests.doInvoke (test.clj:751)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:601)
user$eval75$fn__139.invoke (NO_SOURCE_FILE:1)
user$eval75.invoke (NO_SOURCE_FILE:1)
clojure.lang.Compiler.eval (Compiler.java:6511)
clojure.lang.Compiler.eval (Compiler.java:6501)
clojure.lang.Compiler.eval (Compiler.java:6477)
clojure.core$eval.invoke (core.clj:2797)
clojure.main$eval_opt.invoke (main.clj:297)
clojure.main$initialize.invoke (main.clj:316)
clojure.main$null_opt.invoke (main.clj:349)
clojure.main$main.doInvoke (main.clj:427)
clojure.lang.RestFn.invoke (RestFn.java:421)
clojure.lang.Var.invoke (Var.java:419)
clojure.lang.AFn.applyToHelper (AFn.java:163)
clojure.lang.Var.applyTo (Var.java:532)
clojure.main.main (main.java:37)
Ran 6 tests containing 92 assertions.
7 failures, 1 errors.
Tests failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment