Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASweb-backend-go
Commits
ca0ccf82
Commit
ca0ccf82
authored
Jan 27, 2021
by
Sonja Happ
Browse files
WIP: file test independent of test data
parent
f70fa4f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
routes/file/file_test.go
View file @
ca0ccf82
...
...
@@ -23,6 +23,7 @@ package file
import
(
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
...
...
@@ -62,9 +63,9 @@ func addScenario() (scenarioID uint) {
// POST $newScenario
newScenario
:=
ScenarioRequest
{
Name
:
helper
.
Scenario
A
.
Name
,
Running
:
helper
.
ScenarioA
.
Running
,
StartParameters
:
helper
.
ScenarioA
.
StartParameters
,
Name
:
"
Scenario
1"
,
Running
:
true
,
StartParameters
:
postgres
.
Jsonb
{
RawMessage
:
json
.
RawMessage
(
`{"parameter1" : "testValue1A", "parameter2" : "testValue2A", "parameter3" : 42}`
)}
,
}
_
,
resp
,
_
:=
helper
.
TestEndpoint
(
router
,
token
,
"/api/scenarios"
,
"POST"
,
helper
.
KeyModels
{
"scenario"
:
newScenario
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment