Commit d2c8116 1 parent 9bf7442 commit d2c8116 Copy full SHA for d2c8116
File tree 1 file changed +22
-0
lines changed
test/integration/lockfile
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -435,3 +435,25 @@ def test_lock_upgrade_path(self):
435
435
lock = c .load ("conan.lock" )
436
436
assert "libd/1.1" in lock
437
437
assert "libd/1.2" not in lock
438
+
439
+
440
+ def test_lock_upgrade_new_requirement (self ):
441
+ c = TestClient (light = True )
442
+ c .save ({"liba/conanfile.py" : GenConanfile ("liba" ).with_requires ("libb/1.0" ),
443
+ "libb/conanfile.py" : GenConanfile ("libb" ).with_requires ("libc/1.0" ),
444
+ "libc/conanfile.py" : GenConanfile ("libc" ),
445
+ "libd/conanfile.py" : GenConanfile ("libd" )})
446
+ c .run (f"export liba --version=1.0" )
447
+ c .run (f"export libb --version=1.0" )
448
+ c .run (f"export libc --version=1.0" )
449
+ c .run (f"export libd --version=1.0" )
450
+ c .save ({f"conanfile.py" : GenConanfile ().with_requires (f"liba/[>=1.0 <2]" )})
451
+ c .run ("lock create ." )
452
+
453
+ c .save ({"libb/conanfile.py" : GenConanfile ("libb" ).with_requires ("libd/1.0" )})
454
+ c .run (f"export libb --version=2.0" )
455
+ c .run ("lock upgrade --requires='libb/[>=2]' --update-requires='libb/*'" )
456
+ lock = c .load ("conan.lock" )
457
+ assert "libb/2.0" in lock
458
+ assert "libd/1.0" in lock
459
+ assert "libc/1.0" in lock # TODO: libc should be removed from lockfile? It is not required anymore...
You can’t perform that action at this time.
0 commit comments