Add minio go test (#13800)

### What problem does this PR solve?

1. Add go test
2. Update CI process

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-03-27 18:12:56 +08:00
committed by GitHub
parent 2240fc778c
commit 1fff48b656
10 changed files with 775 additions and 69 deletions

View File

@@ -59,9 +59,9 @@ type ConnectionArgs struct {
Password string
APIToken string
UserName string
Command string // Original command string (for SQL mode)
CommandArgs []string // Split command arguments (for ContextEngine mode)
IsSQLMode bool // true=SQL mode (quoted), false=ContextEngine mode (unquoted)
Command string // Original command string (for SQL mode)
CommandArgs []string // Split command arguments (for ContextEngine mode)
IsSQLMode bool // true=SQL mode (quoted), false=ContextEngine mode (unquoted)
ShowHelp bool
AdminMode bool
OutputFormat OutputFormat // Output format: table, plain, json
@@ -384,8 +384,7 @@ Configuration File:
Commands:
SQL commands (use quotes): "LIST USERS", "CREATE USER 'email' 'password'", etc.
Context Engine commands (no quotes): ls datasets, search "keyword", cat path, etc.
If no command is provided, CLI runs in interactive mode.
`)
If no command is provided, CLI runs in interactive mode.`)
}
// HistoryFile returns the path to the history file
@@ -921,10 +920,10 @@ func (c *CLI) printContextEngineResult(result *contextengine.Result, cmdType con
break
}
}
fmt.Println(sep)
fmt.Printf("Total: %d\n", result.Total)
}
case contextengine.CommandCat:
fmt.Println(sep)
fmt.Printf("Total: %d\n", result.Total)
}
case contextengine.CommandCat:
// Cat output is handled differently - it returns []byte, not *Result
// This case should not be reached in normal flow since Cat returns []byte directly
fmt.Println("Content retrieved")
@@ -1138,7 +1137,8 @@ type ListCommandOptions struct {
// parseSearchCommandArgs parses search command arguments
// Format: search [-d dir1] [-d dir2] ... -q query [-k top_k] [-t threshold]
// search -h|--help (shows help)
//
// search -h|--help (shows help)
func parseSearchCommandArgs(args []string) (*SearchCommandOptions, error) {
opts := &SearchCommandOptions{
TopK: 10,

View File

@@ -446,7 +446,7 @@ func (p *Parser) parseCreateCommand() (*Command, error) {
case TokenToken:
return p.parseCreateToken()
case TokenIndex:
return p.parseCreateIndex()
return p.parseCreateIndex()
default:
return nil, fmt.Errorf("unknown CREATE target: %s", p.curToken.Value)
}
@@ -691,7 +691,7 @@ func (p *Parser) parseDropCommand() (*Command, error) {
case TokenToken:
return p.parseDropToken()
case TokenIndex:
return p.parseDropIndex()
return p.parseDropIndex()
default:
return nil, fmt.Errorf("unknown DROP target: %s", p.curToken.Value)
}