Esempio n. 1
0
func testsInit() error {
	if err := tests.TestsInit("files"); err != nil {
		return err
	}

	f, err := os.Create(file)
	tests.IfExit(err)
	f.Write([]byte(content))

	return nil
}
Esempio n. 2
0
func TestMain(m *testing.M) {
	runtime.GOMAXPROCS(1)
	log.SetFormatter(logger.ErisFormatter{})

	log.SetLevel(log.ErrorLevel)
	// log.SetLevel(log.InfoLevel)
	// log.SetLevel(log.DebugLevel)

	tests.IfExit(tests.TestsInit("chain"))
	log.Info("Test init completed. Starting main test sequence now")

	layTestChainToml(chainName)

	fmt.Println(m.Run())
}
Esempio n. 3
0
func testsInit() error {
	if err := tests.TestsInit("files"); err != nil {
		return err
	}

	f, err := os.Create(file)
	tests.IfExit(err)
	f.Write([]byte(content))

	do1 := definitions.NowDo()
	do1.Operations.Args = []string{"ipfs"}
	err = services.StartService(do1)
	tests.IfExit(err)
	time.Sleep(5 * time.Second) // boot time

	return nil
}
Esempio n. 4
0
func TestMain(m *testing.M) {
	log.SetFormatter(logger.ErisFormatter{})

	log.SetLevel(log.ErrorLevel)
	// log.SetLevel(log.InfoLevel)
	// log.SetLevel(log.DebugLevel)

	tests.IfExit(tests.TestsInit("actions"))
	exitCode := m.Run()

	log.Info("Tearing tests down")
	if os.Getenv("TEST_IN_CIRCLE") != "true" {
		tests.IfExit(tests.TestsTearDown())
	}

	os.Exit(exitCode)
}
Esempio n. 5
0
func TestMain(m *testing.M) {
	var logLevel log.LogLevel

	logLevel = 0
	// logLevel = 1
	// logLevel = 3

	log.SetLoggers(logLevel, os.Stdout, os.Stderr)

	tests.IfExit(tests.TestsInit("perform"))

	tests.RemoveAllContainers()

	exitCode := m.Run()

	if os.Getenv("TEST_IN_CIRCLE") != "true" {
		tests.IfExit(tests.TestsTearDown())
	}

	os.Exit(exitCode)
}
Esempio n. 6
0
func TestMain(m *testing.M) {
	runtime.GOMAXPROCS(1)
	var logLevel log.LogLevel
	var err error

	logLevel = 0
	// logLevel = 1
	// logLevel = 3

	log.SetLoggers(logLevel, os.Stdout, os.Stderr)

	tests.IfExit(tests.TestsInit("chain"))
	logger.Infoln("Test init completed. Starting main test sequence now.\n")

	layTestChainToml(chainName)

	_ = err
	var exitCode int

	exitCode = m.Run()
	fmt.Println(exitCode)
}
Esempio n. 7
0
func testsInit() error {
	if err := tests.TestsInit("actions"); err != nil {
		return err
	}
	return nil
}
Esempio n. 8
0
func testsInit() error {
	if err := tests.TestsInit("services"); err != nil {
		return err
	}
	return nil
}
Esempio n. 9
0
func testsInit() error {
	if err := tests.TestsInit("contracts"); err != nil {
		return err
	}
	return nil
}
Esempio n. 10
0
func testsInit() error {
	if err := tests.TestsInit("clean"); err != nil {
		return err
	}
	return nil
}