func TestCreateDatabase(t *testing.T) {
	var f Flags
	e := EmbeddedData{
		SQLFS: fstest.MapFS{
			"user_create.sql":                  &fstest.MapFile{Data: []byte("2")},
			"user_delete.sql":                  &fstest.MapFile{Data: []byte("6")},
			"user_read.sql":                    &fstest.MapFile{Data: []byte("3")},
			"users.sql":                        &fstest.MapFile{Data: []byte("1")},
			"user_update_password.sql":         &fstest.MapFile{Data: []byte("4")},
			"user_update_points_increment.sql": &fstest.MapFile{Data: []byte("5")},
		},
	}
	ctx := context.Background()
	got, err := f.CreateDatabase(ctx, "TestCreateDatabaseDriver", e)
	switch {
	case err != nil:
		t.Errorf("unwanted error: %v", err)
	case got == nil:
		t.Error("nil database created")
	}
}
// TestCreateDatabase only checks the happy path, making sure defaults defined in config.go are valid.
TestCreateDatabase only checks the happy path, making sure defaults defined in config.go are valid.
// TestCreateDatabase only checks the happy path making sure defaults defined in config . go are valid .
func TestCreateDatabase(t *testing.T) {
	var f Flags
	e := EmbeddedData{
		SQLFS: fstest.MapFS{
			"user_create.sql":                  &fstest.MapFile{Data: []byte("2")},
			"user_delete.sql":                  &fstest.MapFile{Data: []byte("6")},
			"user_read.sql":                    &fstest.MapFile{Data: []byte("3")},
			"users.sql":                        &fstest.MapFile{Data: []byte("1")},
			"user_update_password.sql":         &fstest.MapFile{Data: []byte("4")},
			"user_update_points_increment.sql": &fstest.MapFile{Data: []byte("5")},
		},
	}
	ctx := context.Background()
	got, err := f.CreateDatabase(ctx, "TestCreateDatabaseDriver", e)
	switch {
	case err != nil:
		t.Errorf("unwanted error: %v", err)
	case got == nil:
		t.Error("nil database created")
	}
}
func TestCreateDatabase ( t * testing . T ) { var f Flags e := EmbeddedData { SQLFS : fstest . MapFS { " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , " " : & fstest . MapFile { Data : [ ] byte ( " " ) } , } , } ctx := context . Background ( ) got , err := f . CreateDatabase ( ctx , " " , e ) switch { case err != nil : t . Errorf ( " " , err ) case got == nil : t . Error ( " " ) } }
TestCreateDatabase only checks the happy path, making sure defaults defined in config.go are valid.
TestCreateDatabase only checks the happy path making sure defaults defined in config . go are valid .