WIP: file test independent of test data

This commit is contained in:
Sonja Happ 2021-01-27 10:32:30 +01:00
parent f70fa4f5e1
commit ca0ccf82d1

View file

@ -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.ScenarioA.Name,
Running: helper.ScenarioA.Running,
StartParameters: helper.ScenarioA.StartParameters,
Name: "Scenario1",
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})