mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
ci(deps): upgrade golangci-lint (#2556)
* ci(deps): upgrade golangci-lint
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
* build(deps): removed disabled linters
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
* build(deps): go run github.com/daixiang0/gci@latest write .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): go run golang.org/x/tools/cmd/goimports@latest -l -w .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): go run github.com/bombsimon/wsl/v4/cmd...@latest -strict-append -test=true -fix ./...
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): go run github.com/catenacyber/perfsprint@latest -fix ./...
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): replace gomnd by mnd
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): make gqlgen
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build: Revert "build(deps): go run github.com/daixiang0/gci@latest write ."
This reverts commit 5bf8c42e1f.
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): go run github.com/daixiang0/gci@latest write -s 'standard' -s default -s 'prefix(zotregistry.dev/zot)' .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* build(deps): make gqlgen
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: check-log issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: gci issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
* fix: tests
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
---------
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
This commit is contained in:
@@ -46,6 +46,7 @@ func NewLogger(level, output string) Logger {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log = zerolog.New(file)
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,9 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
username, seedUser := test.GenerateRandomString()
|
||||
password, seedPass := test.GenerateRandomString()
|
||||
htpasswdPath := test.MakeHtpasswdFileFromString(test.GetCredString(username, password))
|
||||
|
||||
defer os.Remove(htpasswdPath)
|
||||
|
||||
conf.HTTP.Auth = &config.AuthConfig{
|
||||
HTPasswd: config.AuthHTPasswd{
|
||||
Path: htpasswdPath,
|
||||
@@ -98,15 +100,19 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ := io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
var auditLog AuditLog
|
||||
|
||||
err = json.Unmarshal(byteValue, &auditLog)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -131,15 +137,19 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ := io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
var auditLog AuditLog
|
||||
|
||||
err = json.Unmarshal(byteValue, &auditLog)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -166,11 +176,14 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
@@ -194,11 +207,14 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
@@ -227,15 +243,19 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ := io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
var auditLog AuditLog
|
||||
|
||||
err = json.Unmarshal(byteValue, &auditLog)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -257,16 +277,20 @@ func TestAuditLogMessages(t *testing.T) {
|
||||
resp, err = resty.R().SetBasicAuth(username, password).
|
||||
SetHeader("Content-Type", "application/octet-stream").
|
||||
SetHeader("Content-Range", contentRange).SetBody(chunk).Patch(loc)
|
||||
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, http.StatusAccepted)
|
||||
|
||||
// wait until the file is populated
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
|
||||
for {
|
||||
if len(byteValue) != 0 {
|
||||
break
|
||||
}
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
byteValue, _ = io.ReadAll(auditFile)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user