|
| 1 | +# |
| 2 | +# Author:: Hugo Lopes Tavares <[email protected]> |
| 3 | +# Cookbook Name:: python |
| 4 | +# Recipe:: test_virtualenv |
| 5 | +# |
| 6 | +# Copyright 2013, Heavy Water Operations, LLC. |
| 7 | +# Copyright 2014, Yipit, Inc. |
| 8 | +# |
| 9 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 | +# you may not use this file except in compliance with the License. |
| 11 | +# You may obtain a copy of the License at |
| 12 | +# |
| 13 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +# |
| 15 | +# Unless required by applicable law or agreed to in writing, software |
| 16 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 17 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | +# See the License for the specific language governing permissions and |
| 19 | +# limitations under the License. |
| 20 | +# |
| 21 | + |
| 22 | +file "/tmp/first-install.txt" do |
| 23 | + content "test" |
| 24 | + action :nothing |
| 25 | +end |
| 26 | + |
| 27 | +file "/tmp/second-install.txt" do |
| 28 | + content "test" |
| 29 | + action :nothing |
| 30 | +end |
| 31 | + |
| 32 | +python_virtualenv "/tmp/virtualenv" do |
| 33 | + owner "root" |
| 34 | + group "root" |
| 35 | + action :create |
| 36 | +end |
| 37 | + |
| 38 | +python_pip "should_dsl first install" do |
| 39 | + package_name "should_dsl" |
| 40 | + virtualenv "/tmp/virtualenv" |
| 41 | + version "2.1.2" |
| 42 | + notifies :create, "file[/tmp/first-install.txt]" |
| 43 | +end |
| 44 | + |
| 45 | +python_pip "should_dsl second install" do |
| 46 | + package_name "should_dsl" |
| 47 | + virtualenv "/tmp/virtualenv" |
| 48 | + # same version as before |
| 49 | + version "2.1.2" |
| 50 | + notifies :create, "file[/tmp/second-install.txt]" |
| 51 | +end |
0 commit comments