Skip to content

Commit

Permalink
Merge branch 'master' into docker-multiarch
Browse files Browse the repository at this point in the history
  • Loading branch information
eternal-flame-AD committed Oct 16, 2024
2 parents 721aecf + 58084c8 commit 97a8020
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Co

ui.Register(g, *vInfo, conf.Registration)

g.GET("/health", healthHandler.Health)
g.Match([]string{"GET", "HEAD"}, "/health", healthHandler.Health)
g.GET("/swagger", docs.Serve)
g.StaticFS("/image", &onlyImageFS{inner: gin.Dir(conf.UploadedImagesDir, false)})

Expand Down
4 changes: 2 additions & 2 deletions test/testdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ type MessageBuilder struct {

// NewDBWithDefaultUser creates a new test db instance with the default user.
func NewDBWithDefaultUser(t *testing.T) *Database {
db, err := database.New("sqlite3", fmt.Sprintf("file:%s?mode=memory&cache=shared", fmt.Sprint(time.Now().Unix())), "admin", "pw", 5, true)
db, err := database.New("sqlite3", fmt.Sprintf("file:%s?mode=memory&cache=shared", fmt.Sprint(time.Now().UnixNano())), "admin", "pw", 5, true)
assert.Nil(t, err)
assert.NotNil(t, db)
return &Database{GormDatabase: db, t: t}
}

// NewDB creates a new test db instance.
func NewDB(t *testing.T) *Database {
db, err := database.New("sqlite3", fmt.Sprintf("file:%s?mode=memory&cache=shared", fmt.Sprint(time.Now().Unix())), "admin", "pw", 5, false)
db, err := database.New("sqlite3", fmt.Sprintf("file:%s?mode=memory&cache=shared", fmt.Sprint(time.Now().UnixNano())), "admin", "pw", 5, false)
assert.Nil(t, err)
assert.NotNil(t, db)
return &Database{GormDatabase: db, t: t}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const testPluginDir = (): {dir: string; generator: () => string} => {
const dirName = 'gotifyplugin_' + random;
const dir = path.join(testBuildPath, dirName);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, 0o755);
fs.mkdirSync(dir, {recursive: true, mode: 0o755});
}
return {
dir,
Expand Down Expand Up @@ -105,7 +105,7 @@ const buildGoExecutable = (filename: string): Promise<void> => {
const envGotify = process.env.GOTIFY_EXE;
if (envGotify) {
if (!fs.existsSync(testBuildPath)) {
fs.mkdirSync(testBuildPath);
fs.mkdirSync(testBuildPath, {recursive: true});
}
fs.copyFileSync(envGotify, filename);
process.stdout.write(`### Copying ${envGotify} to ${filename}\n`);
Expand Down

0 comments on commit 97a8020

Please sign in to comment.