0

我分叉了一个现有的存储库,然后克隆了它。然后我对代码进行了更改,然后将更改推送到我的分叉存储库。然后我创建了一个对基础仓库的拉取请求。

Travis 构建完成后,我看到它失败了。它本质上是什么意思?

4

1 回答 1

1

看起来有些测试失败了,例如:

1) MtGox::Client#buy! should place a bid
     Failure/Error: buy = @client.buy!(0.88, 0.89)
     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: POST https://data.mtgox.com/api/0/buyBTC.php with body 'amount=0.88&price=0.89&nonce=1321745961249676' with headers {'Accept'=>'*/*', 'Content-Type'=>'application/x-www-form-urlencoded', 'Rest-Key'=>'key', 'Rest-Sign'=>'ixxn/IrNcHJVB6ztBisOVfUSfm3PUVK3n/YAb2lACdFRrQWFFFMDBTbwIBu8aELgBmgL8j3qqIpY99ozh9FjcA==', 'User-Agent'=>'Ruby'}

       You can stub this request with the following snippet:

       stub_request(:post, "https://data.mtgox.com/api/0/buyBTC.php").
         with(:body => {"amount"=>"0.88", "nonce"=>"1321745961249676", "price"=>"0.89"},
              :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/x-www-form-urlencoded', 'Rest-Key'=>'key', 'Rest-Sign'=>'ixxn/IrNcHJVB6ztBisOVfUSfm3PUVK3n/YAb2lACdFRrQWFFFMDBTbwIBu8aELgBmgL8j3qqIpY99ozh9FjcA==', 'User-Agent'=>'Ruby'}).
         to_return(:status => 200, :body => "", :headers => {})

       registered request stubs:

       stub_request(:post, "https://mtgox.com/api/0/buyBTC.php").
         with(:body => "amount=0.88&price=0.89&nonce=1321745961249676",
              :headers => {'Rest-Key'=>'key', 'Rest-Sign'=>'ixxn/IrNcHJVB6ztBisOVfUSfm3PUVK3n/YAb2lACdFRrQWFFFMDBTbwIBu8aELgBmgL8j3qqIpY99ozh9FjcA=='})

       ============================================================
     # ./lib/mtgox/request.rb:16:in `request'
     # ./lib/mtgox/request.rb:10:in `post'
     # ./lib/mtgox/client.rb:178:in `buy!'
     # ./spec/mtgox/client_spec.rb:211:in `block (3 levels) in <top (required)>'

当您在 github 上提交拉取请求时,如果您配置了 travis,则 travis 将为该特定版本的工作树开始构建。如果 travis 配置为运行一些测试并指示失败(恰好在您的情况下),则表明 Travis 构建失败。

理想情况下,您需要修复您为拉取请求提交的分支中的这些错误,并在上游作者批准您的拉取请求之前让 travis 构建成功。

于 2013-04-13T19:33:48.360 回答