mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
WIP: file test independent of test data
This commit is contained in:
parent
f70fa4f5e1
commit
ca0ccf82d1
1 changed files with 4 additions and 3 deletions
|
@ -23,6 +23,7 @@ package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
@ -62,9 +63,9 @@ func addScenario() (scenarioID uint) {
|
||||||
|
|
||||||
// POST $newScenario
|
// POST $newScenario
|
||||||
newScenario := ScenarioRequest{
|
newScenario := ScenarioRequest{
|
||||||
Name: helper.ScenarioA.Name,
|
Name: "Scenario1",
|
||||||
Running: helper.ScenarioA.Running,
|
Running: true,
|
||||||
StartParameters: helper.ScenarioA.StartParameters,
|
StartParameters: postgres.Jsonb{RawMessage: json.RawMessage(`{"parameter1" : "testValue1A", "parameter2" : "testValue2A", "parameter3" : 42}`)},
|
||||||
}
|
}
|
||||||
_, resp, _ := helper.TestEndpoint(router, token,
|
_, resp, _ := helper.TestEndpoint(router, token,
|
||||||
"/api/scenarios", "POST", helper.KeyModels{"scenario": newScenario})
|
"/api/scenarios", "POST", helper.KeyModels{"scenario": newScenario})
|
||||||
|
|
Loading…
Add table
Reference in a new issue