From b62f20cd8aa82d83ce72981b45a80d28c81c2ae8 Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Wed, 13 Sep 2023 17:29:23 +0300 Subject: [PATCH] Rename tokens refresh thresholds --- access_test.go | 4 ++-- artifactory_test.go | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/access_test.go b/access_test.go index 919eba11c..c0a3d3ff5 100644 --- a/access_test.go +++ b/access_test.go @@ -76,7 +76,7 @@ func TestRefreshableAccessTokens(t *testing.T) { assert.NotEmpty(t, curRefreshToken) // Make the token always refresh. - auth.InviteRefreshBeforeExpiryMinutes = 365 * 24 * 60 + auth.RefreshPlatformTokenBeforeExpiryMinutes = 365 * 24 * 60 // Upload a file and assert tokens were refreshed. uploadedFiles++ @@ -90,7 +90,7 @@ func TestRefreshableAccessTokens(t *testing.T) { } // Make the token not refresh. Verify Tokens did not refresh. - auth.InviteRefreshBeforeExpiryMinutes = 0 + auth.RefreshPlatformTokenBeforeExpiryMinutes = 0 uploadedFiles++ err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, "testdata/a/b/b2.in", uploadedFiles) if !assert.NoError(t, err) { diff --git a/artifactory_test.go b/artifactory_test.go index 390961e66..b00a48d3f 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -5268,7 +5268,7 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { assert.NotEmpty(t, curRefreshToken) // Make the token always refresh. - auth.RefreshBeforeExpiryMinutes = 60 + auth.RefreshArtifactoryTokenBeforeExpiryMinutes = 60 // Upload a file and assert tokens were refreshed. uploadedFiles++ @@ -5312,7 +5312,7 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { } // Make the token not refresh. Verify Tokens did not refresh. - auth.RefreshBeforeExpiryMinutes = 0 + auth.RefreshArtifactoryTokenBeforeExpiryMinutes = 0 uploadedFiles++ err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, "testdata/a/b/b2.in", uploadedFiles) if err != nil { diff --git a/go.mod b/go.mod index d7e0ceb82..e08302812 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230907095444-fd00f19be95d +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230913142337-0a921a9e7d2f // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230906115540-2c3c91d271d6 +replace github.com/jfrog/jfrog-client-go => github.com/RobiNino/jfrog-client-go v0.0.0-20230913141953-7b3b3a691883 // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index 172de0208..2fbd81f7a 100644 --- a/go.sum +++ b/go.sum @@ -53,6 +53,10 @@ github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5 github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230913142337-0a921a9e7d2f h1:SOC5FZPdwLDxy3OuDo6k5sAXr4h6xUvs/Ovo2hJOLSg= +github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230913142337-0a921a9e7d2f/go.mod h1:VZ0pu2Ei513gttJhS/qjhp51tfq+27Nuf9Q9d6dQ+lw= +github.com/RobiNino/jfrog-client-go v0.0.0-20230913141953-7b3b3a691883 h1:vIN6rRIO91vQprv8YLvtMtej9aKtZiNJ/ORechOtlTI= +github.com/RobiNino/jfrog-client-go v0.0.0-20230913141953-7b3b3a691883/go.mod h1:362+oa7uTTYurzBs1L0dmUTlLo7uhpAU/pwM5Zb9clg= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= @@ -239,10 +243,6 @@ github.com/jfrog/build-info-go v1.9.10 h1:uXnDLVxpqxoAMpXcki00QaBB+M2BoGMMpHODPk github.com/jfrog/build-info-go v1.9.10/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.41.5 h1:+hQs69dXhNrDIDsBlEPcmLgywfkzyKrIsCZtBW486PU= -github.com/jfrog/jfrog-cli-core/v2 v2.41.5/go.mod h1:HCMfdtCy2B81EF8YiQlsfbG3CsLk/VeqoWGNYoSUz8Q= -github.com/jfrog/jfrog-client-go v1.32.1 h1:RQmuPSLsF5222vZJzwkgHSZMMJF83ExS7SwIvh4P+H8= -github.com/jfrog/jfrog-client-go v1.32.1/go.mod h1:362+oa7uTTYurzBs1L0dmUTlLo7uhpAU/pwM5Zb9clg= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk=