Closed tjyang closed 9 months ago
[me@rocky9t01a zabbix-api-rs]$ ./run-integration-tests.sh
Finished test [unoptimized + debuginfo] target(s) in 0.11s
Running unittests src/lib.rs (target/debug/deps/zabbix_api-3cf3010a4bb68ef2)
running 12 tests test client::v6::tests::get_api_info ... ok test client::v6::tests::create_web_scenario ... ok test client::v6::tests::create_host_group_and_host ... ok test client::v6::tests::create_item ... ok test client::v6::tests::get_host_groups_test ... ok test client::v6::tests::create_trigger ... ok test client::v6::tests::get_hosts_test ... ok test client::v6::tests::get_items_test ... ok test client::v6::tests::get_triggers_test ... ok test client::v6::tests::session_should_be_returned ... ok test client::v6::tests::raw_api_call_test ... ok test client::v6::tests::get_webscenarios_test ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.93s
Doc-tests zabbix-api
running 2 tests test src/client/mod.rs - client::ZabbixApiClient::get_hosts (line 37) ... ok test src/client/mod.rs - client::ZabbixApiClient::create_host (line 88) ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.92s
[me@rocky9t01a zabbix-api-rs]$
latest git commit
running 12 tests test client::v6::tests::get_api_info ... ok test client::v6::tests::create_host_group_and_host ... ok test client::v6::tests::get_host_groups_test ... ok test client::v6::tests::create_trigger ... FAILED test client::v6::tests::create_item ... ok test client::v6::tests::create_web_scenario ... ok test client::v6::tests::get_hosts_test ... ok test client::v6::tests::get_items_test ... ok test client::v6::tests::get_triggers_test ... ok test client::v6::tests::session_should_be_returned ... ok test client::v6::tests::raw_api_call_test ... ok test client::v6::tests::get_webscenarios_test ... ok
failures:
---- client::v6::tests::create_trigger stdout ---- [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] getting auth session for user 'Admin'.. [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] send post request to 'http://localhost:3080/api_jsonrpc.php' [2024-01-28T08:44:03Z DEBUG reqwest::connect] starting new connection: http://localhost:3080/ [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] {"jsonrpc":"2.0","result":"e1da90fc6d41b96971dd4028cf26e20a","id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[/HTTP RESPONSE]---- [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] auth ok [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] creating host group '8gIkLuWjBT'.. [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] send post request to 'http://localhost:3080/api_jsonrpc.php' [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] {"jsonrpc":"2.0","result":{"groupids":["26"]},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[/HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [response body] [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] {"jsonrpc":"2.0","result":{"groupids":["26"]},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [/response body] [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] host group '8gIkLuWjBT' has been created [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] creating host 'kAY6LHLQLdpAqmdADGD'.. [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] send post request to 'http://localhost:3080/api_jsonrpc.php' [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] {"jsonrpc":"2.0","result":{"hostids":["10563"]},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[/HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [response body] [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] {"jsonrpc":"2.0","result":{"hostids":["10563"]},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [/response body] [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] host 'kAY6LHLQLdpAqmdADGD' has been created [2024-01-28T08:44:03Z INFO zabbix_api::client::v6] creating item with key 'keyF5ra6' for host id 10563.. [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] send post request to 'http://localhost:3080/api_jsonrpc.php' [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] {"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"DBEXECUTE_ERROR"},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::post] ---[/HTTP RESPONSE]---- [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [response body] [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] {"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"DBEXECUTE_ERROR"},"id":1} [2024-01-28T08:44:03Z DEBUG zabbix_api::client::v6] [/response body] [2024-01-28T08:44:03Z ERROR zabbix_api::client::v6] ZabbixError { code: -32500, message: "Application error.", data: "DBEXECUTE_ERROR" } Caused by: [zabbix error] code -32500, message 'Application error.', data: 'DBEXECUTE_ERROR' [/zabbix error] [2024-01-28T08:44:03Z ERROR zabbix_api::tests::builder] item create error: zabbix api call error thread 'client::v6::tests::create_trigger' panicked at src/tests/builder.rs:143:17: zabbix api call error note: run with
RUST_BACKTRACE=1
environment variable to display a backtracefailures: client::v6::tests::create_trigger
test result: FAILED. 11 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.95s
error: test failed, to rerun pass
--lib
[me@rocky9t01a zabbix-api-rs]$