gitlab.com/ignitionrobotics/web/ign-go@v1.0.0-rc4/main_test.go (about)

     1  package ign
     2  
     3  import (
     4  	"log"
     5  	"os"
     6  	"testing"
     7  )
     8  
     9  // This function applies to ALL tests in the application.
    10  // It will run the test and then clean the database.
    11  func TestMain(m *testing.M) {
    12  	code := m.Run()
    13  	packageTearDown()
    14  	log.Println("Cleaned database tables after all tests")
    15  	os.Exit(code)
    16  }
    17  
    18  // Clean up our mess
    19  func packageTearDown() {
    20  	cleanDBTables()
    21  }
    22  
    23  func cleanDBTables() {
    24  }