remove redundant test files

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-07-14 16:02:49 -04:00
parent c79c1f2c9a
commit cdcf886454
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
2 changed files with 0 additions and 71 deletions

View File

@ -1,64 +0,0 @@
package orm
import "fmt"
const do_bootstrap = false
func TestMain() {
e, err := Open("postgres://testbed_user:123@localhost/testbed_i_think")
if err != nil {
panic(err)
}
u := author()
s := iti_multi(u)
e.Models(user{}, story{}, band{}, role{})
if do_bootstrap {
err = e.Migrate()
if err != nil {
panic(err)
}
f := friend()
err = e.Model(&user{}).Create(&f)
if err != nil {
panic(err)
}
err = e.Model(&user{}).Create(&u)
if err != nil {
panic(err)
}
u.Favs.Authors = append(u.Favs.Authors, f)
err = e.Model(&user{}).Save(&u)
if err != nil {
panic(err)
}
err = e.Model(&band{}).Create(&bodom)
if err != nil {
panic(err)
}
err = e.Model(&band{}).Create(&diamondHead)
if err != nil {
panic(err)
}
}
err = e.Model(&user{}).Where("ID = ?", s.Author.ID).Find(&s.Author)
if err != nil {
panic(err)
}
err = e.Model(&story{}).Save(s)
if err != nil {
panic(err)
}
s.Downloads = s.Downloads + 1
err = e.Model(&story{}).Save(s)
if err != nil {
panic(err)
}
var ns story
err = e.Model(&story{}).Where("ID = ?", 1).Populate(PopulateAll, "Chapters.Bands").Find(&ns)
if err != nil {
panic(err)
}
fmt.Printf("%+v", ns)
}

View File

@ -1,7 +0,0 @@
package main
import "rockfic.com/orm"
func main() {
orm.TestMain()
}