Repair broken tests
parent
901aa0bb02
commit
9e62489f77
|
@ -171,7 +171,7 @@ func (c *Client) Backup(ctx context.Context, build chronograf.BuildInfo) error {
|
|||
backupDir := path.Join(path.Dir(c.Path), "backup")
|
||||
_ = os.Mkdir(backupDir, 0700)
|
||||
|
||||
toName := fmt.Sprintf("%s.%s", c.Path, lastBuild.Version)
|
||||
toName := fmt.Sprintf("%s.%s", path.Base(c.Path), lastBuild.Version)
|
||||
toPath := path.Join(backupDir, toName)
|
||||
to, err := os.OpenFile(toPath, os.O_RDWR|os.O_CREATE, 0600)
|
||||
if err != nil {
|
||||
|
|
|
@ -36,6 +36,9 @@ func TestConfig_Get(t *testing.T) {
|
|||
if err := client.Open(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := client.Migrate(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
s := client.ConfigStore
|
||||
|
|
|
@ -218,6 +218,9 @@ func TestOrganizationsStore_All(t *testing.T) {
|
|||
if err := client.Open(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := client.Migrate(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
s := client.OrganizationsStore
|
||||
|
@ -651,6 +654,9 @@ func TestOrganizationsStore_DefaultOrganization(t *testing.T) {
|
|||
if err := client.Open(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := client.Migrate(context.TODO()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer client.Close()
|
||||
s := client.OrganizationsStore
|
||||
|
||||
|
|
Loading…
Reference in New Issue