File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react'
55export 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' ,
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments