From fb824dd4f4e3863088ba19b906d09ba6dcfb5d05 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Tue, 28 May 2024 17:00:45 +0530 Subject: [PATCH] test: print the cnf files Signed-off-by: Manan Gupta --- go/cmd/mysqlctld/cli/mysqlctld.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/cmd/mysqlctld/cli/mysqlctld.go b/go/cmd/mysqlctld/cli/mysqlctld.go index ee3fe241440..2734411746e 100644 --- a/go/cmd/mysqlctld/cli/mysqlctld.go +++ b/go/cmd/mysqlctld/cli/mysqlctld.go @@ -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 { @@ -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) +}