fix: Removed root user flags

This commit is contained in:
jonaustin09
2023-06-01 00:16:01 +04:00
parent 8e86acf20b
commit 04bbe61826
5 changed files with 22 additions and 44 deletions

View File

@@ -20,15 +20,15 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/versity/versitygw/backend"
"github.com/versity/versitygw/s3api/utils"
"github.com/versity/versitygw/s3api/middlewares"
)
func TestNew(t *testing.T) {
type args struct {
app *fiber.App
be backend.Backend
port string
rootUser utils.RootUser
app *fiber.App
be backend.Backend
port string
adminUser middlewares.AdminUser
}
app := fiber.New()
@@ -45,10 +45,10 @@ func TestNew(t *testing.T) {
{
name: "Create S3 api server",
args: args{
app: app,
be: be,
port: port,
rootUser: utils.RootUser{},
app: app,
be: be,
port: port,
adminUser: middlewares.AdminUser{},
},
wantS3ApiServer: &S3ApiServer{
app: app,
@@ -61,7 +61,7 @@ func TestNew(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gotS3ApiServer, err := New(tt.args.app, tt.args.be, tt.args.port, tt.args.rootUser)
gotS3ApiServer, err := New(tt.args.app, tt.args.be, tt.args.port, tt.args.adminUser)
if (err != nil) != tt.wantErr {
t.Errorf("New() error = %v, wantErr %v", err, tt.wantErr)
return