Skip to content

Commit

Permalink
test: print the cnf files
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed May 28, 2024
1 parent 42801f7 commit fb824dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/cmd/mysqlctld/cli/mysqlctld.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ func run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("failed to refresh config: %w", err)
}

printFile(cnf.Path)
printFile(cnf.Path + ".previous")

// check if we were interrupted during a previous restore
if !mysqlctl.RestoreWasInterrupted(cnf) {
if err := mysqld.Start(ctx, cnf); err != nil {
Expand Down Expand Up @@ -190,3 +193,9 @@ func run(cmd *cobra.Command, args []string) error {

return nil
}

func printFile(path string) {
log.Errorf("Printing file - %v", path)
bytes, err := os.ReadFile(path)
log.Errorf("Read - %v, %v", string(bytes), err)
}

0 comments on commit fb824dd

Please sign in to comment.