mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
have simulacradata tests clean up generated files
This commit is contained in:
parent
80f9ddaa02
commit
e297a6775d
2 changed files with 9 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -20,3 +20,4 @@ launch.json
|
|||
__pycache__/
|
||||
report.xml
|
||||
outputs.json
|
||||
builds/
|
||||
|
|
@ -2,12 +2,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
const testRecords int = 1000
|
||||
|
||||
func TestAge(t *testing.T) {
|
||||
defer os.Remove("age.csv")
|
||||
err := GenerateAgeField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
|
@ -15,13 +17,15 @@ func TestAge(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestIP(t *testing.T) {
|
||||
defer os.Remove("ip.csv")
|
||||
err := GenerateIPField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIndentifer(t *testing.T) {
|
||||
func TestIdentifier(t *testing.T) {
|
||||
defer os.Remove("identifier.csv")
|
||||
err := GenerateArbIdField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
|
@ -29,6 +33,7 @@ func TestIndentifer(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestOptIn(t *testing.T) {
|
||||
defer os.Remove("optin.csv")
|
||||
err := GenerateOptInField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
|
@ -36,6 +41,7 @@ func TestOptIn(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCountry(t *testing.T) {
|
||||
defer os.Remove("country.csv")
|
||||
err := GenerateCountryField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
|
@ -43,6 +49,7 @@ func TestCountry(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestTime(t *testing.T) {
|
||||
defer os.Remove("time.csv")
|
||||
err := GenerateTimeField(testRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue