Skip to content

Commit 6c8538d

Browse files
Merge pull request #31 from iulianpascalau/minor-fixes-and-tests
Added allowed hosts
2 parents 36fa453 + 7ae1f6a commit 6c8538d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

frontend/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react'
55
export default defineConfig({
66
plugins: [react()],
77
server: {
8+
allowedHosts: ['admin-mvx-deep-history.jls-software.net'],
89
proxy: {
910
'/api': {
1011
target: 'http://localhost:8080',

integrationTests/envFile_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package integrationTests
2+
3+
import (
4+
"os"
5+
"path"
6+
"testing"
7+
8+
"github.com/joho/godotenv"
9+
"github.com/stretchr/testify/assert"
10+
)
11+
12+
func TestEnvFileReadsAllData(t *testing.T) {
13+
filename := path.Join(t.TempDir(), ".env")
14+
15+
err := os.WriteFile(
16+
filename,
17+
[]byte(`KEY1=value1
18+
KEY2=value2\$3`),
19+
os.ModePerm,
20+
)
21+
assert.Nil(t, err)
22+
23+
err = godotenv.Load(filename)
24+
assert.Nil(t, err)
25+
26+
assert.Equal(t, "value1", os.Getenv("KEY1"))
27+
assert.Equal(t, "value2$3", os.Getenv("KEY2"))
28+
}

0 commit comments

Comments
 (0)