mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
Updated loaders integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
f1bb562b34
commit
c854687ea3
@@ -1,30 +1,110 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
|
||||
"data_db": {
|
||||
"db_type": "*internal",
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "*internal",
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"data_db": {
|
||||
"db_type": "*internal",
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "*internal",
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
{
|
||||
"id": "remove",
|
||||
"action": "*remove",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
"data":[
|
||||
{
|
||||
"type": "*attributes",
|
||||
"file_name": "Attributes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*resources",
|
||||
"file_name": "Resources.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*stats",
|
||||
"file_name": "Stats.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*thresholds",
|
||||
"file_name": "Thresholds.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*routes",
|
||||
"file_name": "Routes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*chargers",
|
||||
"file_name": "Chargers.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatchers",
|
||||
"file_name": "DispatcherProfiles.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatcher_hosts",
|
||||
"file_name": "DispatcherHosts.csv",
|
||||
"fields": [
|
||||
{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"},
|
||||
{"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "Rates.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*action_profiles",
|
||||
"file_name": "Actions.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*accounts",
|
||||
"file_name": "Accounts.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*filters",
|
||||
"file_name": "Filters.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
"admins": {
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
"templates": {
|
||||
"baseTmpl": [
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true}
|
||||
]
|
||||
},
|
||||
|
||||
"admins": {
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
@@ -1,34 +1,114 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
|
||||
"data_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "10",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "cgrates",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
],
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"admins": {
|
||||
"data_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "10",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "cgrates",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
}
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
{
|
||||
"id": "remove",
|
||||
"action": "*remove",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
"data":[
|
||||
{
|
||||
"type": "*attributes",
|
||||
"file_name": "Attributes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*resources",
|
||||
"file_name": "Resources.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*stats",
|
||||
"file_name": "Stats.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*thresholds",
|
||||
"file_name": "Thresholds.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*routes",
|
||||
"file_name": "Routes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*chargers",
|
||||
"file_name": "Chargers.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatchers",
|
||||
"file_name": "DispatcherProfiles.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatcher_hosts",
|
||||
"file_name": "DispatcherHosts.csv",
|
||||
"fields": [
|
||||
{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"},
|
||||
{"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "Rates.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*action_profiles",
|
||||
"file_name": "Actions.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*accounts",
|
||||
"file_name": "Accounts.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*filters",
|
||||
"file_name": "Filters.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
"templates": {
|
||||
"baseTmpl": [
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true}
|
||||
]
|
||||
},
|
||||
|
||||
"admins": {
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,111 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
// CGRateS Configuration file
|
||||
// will be used in apis/loaders_it_test.go
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "10", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "10", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
],
|
||||
"stor_db": {
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
|
||||
"admins": {
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
{
|
||||
"id": "remove",
|
||||
"action": "*remove",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/tmp/TestLoadersIT/in",
|
||||
"tp_out_dir": "",
|
||||
"data":[
|
||||
{
|
||||
"type": "*attributes",
|
||||
"file_name": "Attributes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*resources",
|
||||
"file_name": "Resources.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*stats",
|
||||
"file_name": "Stats.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*thresholds",
|
||||
"file_name": "Thresholds.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*routes",
|
||||
"file_name": "Routes.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*chargers",
|
||||
"file_name": "Chargers.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatchers",
|
||||
"file_name": "DispatcherProfiles.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*dispatcher_hosts",
|
||||
"file_name": "DispatcherHosts.csv",
|
||||
"fields": [
|
||||
{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"},
|
||||
{"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "Rates.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*action_profiles",
|
||||
"file_name": "Actions.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*accounts",
|
||||
"file_name": "Accounts.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
{
|
||||
"type": "*filters",
|
||||
"file_name": "Filters.csv",
|
||||
"fields": [{"tag": "BaseTmpl","type": "*template", "value": "baseTmpl"}],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
"templates": {
|
||||
"baseTmpl": [
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true}
|
||||
]
|
||||
},
|
||||
|
||||
"admins": {
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user