Exemple #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
}
Exemple #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())
}
Exemple #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
}
Exemple #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)
}
Exemple #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)
}
Exemple #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)
}
Exemple #7
0
func testsInit() error {
	if err := tests.TestsInit("actions"); err != nil {
		return err
	}
	return nil
}
Exemple #8
0
func testsInit() error {
	if err := tests.TestsInit("services"); err != nil {
		return err
	}
	return nil
}
Exemple #9
0
func testsInit() error {
	if err := tests.TestsInit("contracts"); err != nil {
		return err
	}
	return nil
}
Exemple #10
0
func testsInit() error {
	if err := tests.TestsInit("clean"); err != nil {
		return err
	}
	return nil
}