package fetcher

import (
	"fmt"
	"testing"

	"github.com/drkaka/lg"
)

func TestGetMessage(t *testing.T) {
	lg.InitLogger(true)

	jCmd := fmt.Sprintf("journalctl -u hooks -o json -n 20")
	results, err := GetMessages("hooks", "ssh", "leeq@192.168.1.201", jCmd)
	if err != nil {
		t.Fatal(err)
	}

	for _, one := range results {
		fmt.Println("Message: ", string(one.Message))
	}
}

package fetcher

// func TestGetMessage(t *testing.T) {
// 	lg.InitLogger(true)

// 	jCmd := fmt.Sprintf("journalctl -u hooks -o json -n 20")
// 	results, err := GetMessages("hooks", "ssh", "leeq@192.168.1.201", jCmd)
// 	if err != nil {
// 		t.Fatal(err)
// 	}

// 	for _, one := range results {
// 		fmt.Println("Message: ", string(one.Message))
// 	}
// }

Comment out the fetcher test method.
Comment out the fetcher test method.
