Initial QSfera import
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package log_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsi/gomega"
|
||||
|
||||
"github.com/qsfera/server/internal/testenv"
|
||||
"github.com/qsfera/server/pkg/log"
|
||||
)
|
||||
|
||||
func TestDeprecation(t *testing.T) {
|
||||
cmdTest := testenv.NewCMDTest(t.Name())
|
||||
if cmdTest.ShouldRun() {
|
||||
log.Deprecation("this is a deprecation")
|
||||
return
|
||||
}
|
||||
|
||||
out, err := cmdTest.Run()
|
||||
|
||||
g := gomega.NewWithT(t)
|
||||
g.Expect(err).ToNot(gomega.HaveOccurred())
|
||||
g.Expect(string(out)).To(gomega.HavePrefix("\033[1;31mDEPRECATION: this is a deprecation"))
|
||||
}
|
||||
Reference in New Issue
Block a user