This commit is contained in:
asteam
2025-05-07 13:15:39 +03:00
parent 0c44daa241
commit c7a2c4ed5a
52 changed files with 1680 additions and 400 deletions

View File

@@ -51,15 +51,12 @@ func getBytesFromJSON(fileName string, t *testing.T) []byte {
func getErrorsFromJSON(bytes []byte, t *testing.T, cloud string) {
var requests map[string]interface{}
var logFileName string
switch cloud {
case "cloudapi":
requests = getRequestsMapCloudAPI()
logFileName = "test_requests_cloudAPI.log"
case "cloudbroker":
requests = getRequestsMapCloudbroker()
logFileName = "test_requests_cloudbroker.log"
default:
t.Fatalf("Wrong cloud provided, expected `cloudapi` or `cloudbroker`, got %s", cloud)
}
@@ -151,7 +148,6 @@ func getErrorsFromJSON(bytes []byte, t *testing.T, cloud string) {
t.Error(msg)
dataLogs = append(dataLogs, msg)
}
compareLogs(logFileName, dataLogs, t, "request")
}
// checkName checks if name field from platform has the same value as json tag in golang structure (maybe including omitempty)