Skip to content

Cant run the unitest with Incorrect Usage. flag provided but not defined: -test.v #2735

@HealerOS

Description

@HealerOS

I upgrade my app go version from go1.14 to go1.19 and the go-micro version to go-micro.dev/v4 v4.9.0.
But my unitest can't run now.
I use Goland to run the basic go unitest ,but the error occurs as below:
Incorrect Usage. flag provided but not defined: -test.v

NAME:
go.micro.server - a go-micro service

USAGE:
___3git_garena_com_shopee_loan_service_credit_backend_user_center_credit_usercenter_bff_src_service_test__TestAdd.test [global options] command [command options] [arguments...]

COMMANDS:
help, h Shows a list of commands or help for one command

It seems like I use the -test.v and the go micro doesn't support it.It is the Goland run unitest parameter.But if I dont import go-micro,my unitest can run normally.

By the way,there is no panic stack trace that I dont know which line code is run incorrectly.

Go land run command is :/Users/jason/Library/Caches/JetBrains/GoLand2024.2/tmp/GoLand/___3git_something_test__TestAdd.test -test.v -test.paniconexit0 -test.bench ^\QTestAdd\E$ -test.run ^$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions