Skip to content

Commit

Permalink
Merge branch 'dev' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 committed Jun 27, 2023
2 parents 5692756 + ec93585 commit ad874c5
Show file tree
Hide file tree
Showing 46 changed files with 289 additions and 441 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
restore-keys: ${{ runner.os }}-go
- name: Run Go vet
run: go vet -v ./...

Static-Check:
name: Static Check ubuntu-latest
runs-on: ubuntu-latest
Expand All @@ -45,9 +46,11 @@ jobs:
with:
go-version: 1.20.x
- name: Static Code Analysis
uses: dominikh/staticcheck-action@v1
uses: golangci/golangci-lint-action@v3
with:
install-go: false
args: |
--timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars
Go-Sec:
name: Go-Sec ubuntu-latest
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ node("docker") {
repo = 'jfrog-cli'
sh 'rm -rf temp'
sh 'mkdir temp'
def goRoot = tool 'go-1.20.4'
def goRoot = tool 'go-1.20.5'
env.GOROOT="$goRoot"
env.PATH+=":${goRoot}/bin"
env.GO111MODULE="on"
Expand Down
10 changes: 5 additions & 5 deletions access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestRefreshableAccessTokens(t *testing.T) {
// Upload a file and assert the refreshable tokens were generated.
artifactoryCommandExecutor := tests.NewJfrogCli(execMain, "jfrog rt", "")
uploadedFiles := 1
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, tests.ServerId, "testdata/a/a1.in", uploadedFiles)
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, "testdata/a/a1.in", uploadedFiles)
if !assert.NoError(t, err) {
return
}
Expand All @@ -80,23 +80,23 @@ func TestRefreshableAccessTokens(t *testing.T) {

// Upload a file and assert tokens were refreshed.
uploadedFiles++
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, tests.ServerId, "testdata/a/a2.in", uploadedFiles)
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, "testdata/a/a2.in", uploadedFiles)
if !assert.NoError(t, err) {
return
}
curAccessToken, curRefreshToken, err = assertTokensChanged(t, tests.ServerId, curAccessToken, curRefreshToken)
curAccessToken, curRefreshToken, err = assertTokensChanged(t, curAccessToken, curRefreshToken)
if !assert.NoError(t, err) {
return
}

// Make the token not refresh. Verify Tokens did not refresh.
auth.InviteRefreshBeforeExpiryMinutes = 0
uploadedFiles++
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, tests.ServerId, "testdata/a/b/b2.in", uploadedFiles)
err = uploadWithSpecificServerAndVerify(t, artifactoryCommandExecutor, "testdata/a/b/b2.in", uploadedFiles)
if !assert.NoError(t, err) {
return
}
newAccessToken, newRefreshToken, err := getArtifactoryTokensFromConfig(t, tests.ServerId)
newAccessToken, newRefreshToken, err := getArtifactoryTokensFromConfig(t)
if !assert.NoError(t, err) {
return
}
Expand Down
Loading

0 comments on commit ad874c5

Please sign in to comment.