casdoor / casdoor-website

The docs website for Casdoor: https://github.com/casbin/casdoor
https://casdoor.org
Apache License 2.0
17 stars 112 forks source link

init_data_dump_test.go not working as intended #611

Closed fabienchevalier closed 6 months ago

fabienchevalier commented 6 months ago

Hello,

I'm trying to retrieve a json file in order to migrate my Casdoor's configuration, using the method provided in the documentation : https://casdoor.org/fr/docs/deployment/data-initialization/

Issue is, the go test object/init_data_dump_test.go is failing :

`go test object/init_data_dump_test.go

command-line-arguments [command-line-arguments.test]

object/init_data_dump_test.go:25:2: undefined: InitConfig object/init_data_dump_test.go:27:9: undefined: DumpToFile FAIL command-line-arguments [build failed] FAIL`

Is there something I'm doing wrong?

Thank you!

casbin-bot commented 6 months ago

@tangyang9464 @JalinWang @imp2002

casbin-bot commented 6 months ago

@leo220yuyaodog @Selflocking

hsluoyz commented 6 months ago

@fabienchevalier fixed by: https://github.com/casdoor/casdoor-website/commit/a993d7ea17eea74cb0fa712d9212a748f4e4b2fe

Use:

go test ./object -v -run TestDumpToFile
fabienchevalier commented 6 months ago

@hsluoyz perfect, thank you for the quick fix!