Skip to content

Commit 8fb9220

Browse files
committed
WIP: Logger interface compatibility fixes and build improvements
1 parent a2cf640 commit 8fb9220

File tree

3 files changed

+78
-89
lines changed

3 files changed

+78
-89
lines changed

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ replace (
66
// Should not be updated to 0.2.6 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372)
77
github.com/c-bata/go-prompt => github.com/c-bata/go-prompt v0.2.5
88

9-
// Local development - logger interface compatibility
10-
github.com/jfrog/build-info-go => ../build-info-go
11-
129
// Should not be updated to 0.2.0-beta.2 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372)
1310
github.com/pkg/term => github.com/pkg/term v1.1.0
1411
)
@@ -247,6 +244,8 @@ require (
247244
sigs.k8s.io/yaml v1.4.0 // indirect
248245
)
249246

247+
replace github.com/jfrog/build-info-go => ../build-info-go
248+
250249
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.59.2-0.20250804083101-9cf424ecc926
251250

252251
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20250812100044-b52afcc698c1

poetry_test.go

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,33 @@ import (
2626
)
2727

2828
func 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
3337
func 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

Comments
 (0)