diff options
author | Martins Polakovs <mp@foo.lv> | 2015-05-23 13:11:23 +0300 |
---|---|---|
committer | Martins Polakovs <mp@foo.lv> | 2015-05-23 13:11:23 +0300 |
commit | cfc9bff45e82f14c2f5a6653c4832f105b0ea365 (patch) | |
tree | d6668737e865d8cd25ccd373520b6573f1abe80c /spec/lib | |
parent | f042b085f64223ffe7b9d26f003ee2db76af27a6 (diff) | |
download | gitlab-ce-cfc9bff45e82f14c2f5a6653c4832f105b0ea365.tar.gz |
Fix upgrader script
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/upgrader_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/upgrader_spec.rb b/spec/lib/gitlab/upgrader_spec.rb index ce3ea6c260a..8baa1662f38 100644 --- a/spec/lib/gitlab/upgrader_spec.rb +++ b/spec/lib/gitlab/upgrader_spec.rb @@ -20,5 +20,20 @@ describe Gitlab::Upgrader do upgrader.stub(current_version_raw: "5.3.0") expect(upgrader.latest_version_raw).to eq("v5.4.2") end + + it 'should get the latest version from tags' do + upgrader.stub(fetch_git_tags: [ + '6f0733310546402c15d3ae6128a95052f6c8ea96 refs/tags/v7.1.1', + 'facfec4b242ce151af224e20715d58e628aa5e74 refs/tags/v7.1.1^{}', + 'f7068d99c79cf79befbd388030c051bb4b5e86d4 refs/tags/v7.10.4', + '337225a4fcfa9674e2528cb6d41c46556bba9dfa refs/tags/v7.10.4^{}', + '880e0ba0adbed95d087f61a9a17515e518fc6440 refs/tags/v7.11.1', + '6584346b604f981f00af8011cd95472b2776d912 refs/tags/v7.11.1^{}', + '43af3e65a486a9237f29f56d96c3b3da59c24ae0 refs/tags/v7.11.2', + 'dac18e7728013a77410e926a1e64225703754a2d refs/tags/v7.11.2^{}', + '0bf21fd4b46c980c26fd8c90a14b86a4d90cc950 refs/tags/v7.9.4', + 'b10de29edbaff7219547dc506cb1468ee35065c3 refs/tags/v7.9.4^{}']) + expect(upgrader.latest_version_raw).to eq("v7.11.2") + end end end |