@@ -26,18 +26,33 @@ import (
2626)
2727
2828func TestPoetryInstallNativeSyntax (t * testing.T ) {
29- testPoetryInstall (t , false )
29+ testPoetryInstall (t , false , false )
30+ }
31+
32+ func TestPoetryInstallNativeFlexPack (t * testing.T ) {
33+ testPoetryInstall (t , false , true )
3034}
3135
3236// Deprecated - Test legacy syntax for backward compatibility
3337func TestPoetryInstallLegacy (t * testing.T ) {
34- testPoetryInstall (t , true )
38+ testPoetryInstall (t , true , false )
3539}
3640
37- func testPoetryInstall (t * testing.T , isLegacy bool ) {
41+ func testPoetryInstall (t * testing.T , isLegacy bool , useFlexPack bool ) {
3842 // Init Poetry test
3943 initPoetryTest (t )
4044
45+ // Set environment for FlexPack implementation if requested
46+ var setEnvCallback func ()
47+ if useFlexPack {
48+ setEnvCallback = clientTestUtils .SetEnvWithCallbackAndAssert (t , "JFROG_RUN_NATIVE" , "true" )
49+ }
50+ defer func () {
51+ if setEnvCallback != nil {
52+ setEnvCallback ()
53+ }
54+ }()
55+
4156 // Populate cli config with 'default' server
4257 oldHomeDir , newHomeDir := prepareHomeDir (t )
4358 defer func () {
@@ -226,6 +241,10 @@ func TestPoetryBuildInfoCollection(t *testing.T) {
226241 // Test the FlexPack build info collection functionality
227242 initPoetryTest (t )
228243
244+ // Set environment for FlexPack implementation
245+ setEnvCallBack := clientTestUtils .SetEnvWithCallbackAndAssert (t , "JFROG_RUN_NATIVE" , "true" )
246+ defer setEnvCallBack ()
247+
229248 oldHomeDir , newHomeDir := prepareHomeDir (t )
230249 defer func () {
231250 clientTestUtils .SetEnvAndAssert (t , coreutils .HomeDir , oldHomeDir )
@@ -330,6 +349,10 @@ func TestPoetryFlexPackFeatures(t *testing.T) {
330349 // Test specific FlexPack features for Poetry
331350 initPoetryTest (t )
332351
352+ // Set environment for FlexPack implementation
353+ setEnvCallBack := clientTestUtils .SetEnvWithCallbackAndAssert (t , "JFROG_RUN_NATIVE" , "true" )
354+ defer setEnvCallBack ()
355+
333356 oldHomeDir , newHomeDir := prepareHomeDir (t )
334357 defer func () {
335358 clientTestUtils .SetEnvAndAssert (t , coreutils .HomeDir , oldHomeDir )
0 commit comments