Skip to content

Commit

Permalink
クラスターメトリクスの期待値を変更する
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed Jan 4, 2024
1 parent 56b1c29 commit 3441c77
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.
55 changes: 32 additions & 23 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,7 @@ var (
listClusterNodesJSONData = `[
{
"node_name": "[email protected]",
"epoch": 1,
"mode": "normal",
"cluster_signaling_url": "ws://127.0.0.1:5001/signaling",
"cluster_api_url": "http://127.0.0.1:3101/",
"member_since": "2022-05-09T07:44:52.973761Z",
"sora_version": "2022.1.0-canary.44",
"license_max_nodes": 10,
"license_max_connections": 100,
"license_serial_code": "SAMPLE-SRA-E001-202212-N10-100",
"license_type": "Experimental",
"connected": true
"connected": false
},
{
"node_name": "[email protected]",
Expand All @@ -175,20 +165,25 @@ var (
"license_serial_code": "SAMPLE-SRA-E001-202212-N10-100",
"license_type": "Experimental",
"connected": true
}
]`
},
{
"node_name": "[email protected]",
"epoch": 1,
"mode": "normal",
"cluster_signaling_url": "ws://127.0.0.1:5001/signaling",
"cluster_api_url": "http://127.0.0.1:3101/",
"member_since": "2022-05-09T07:44:54.160763Z",
"sora_version": "2022.1.0-canary.44",
"license_max_nodes": 10,
"license_max_connections": 100,
"license_serial_code": "SAMPLE-SRA-E001-202212-N10-100",
"license_type": "Experimental",
"connected": true
}
]`
listClusterNodesCurrentJSONData = `[
{
"cluster_node_name": "[email protected]",
"epoch": 1,
"mode": "normal",
"member_since": "2022-05-02T15:26:44.302363Z",
"sora_version": "2021.2.9",
"license_max_connections": 100,
"license_serial_code": "SAMPLE-SRA-E001-202212-N10-100",
"license_type": "Experimental",
"cluster_signaling_url": "ws://127.0.0.1:5001/signaling",
"cluster_api_url": "http://10.1.1.4:3000/",
"connected": false
},
{
Expand All @@ -203,7 +198,21 @@ var (
"cluster_signaling_url": "ws://127.0.0.1:5002/signaling",
"cluster_api_url": "http://10.1.1.3:3000/",
"connected": true
}
},
{
"node_name": "[email protected]",
"epoch": 1,
"mode": "normal",
"cluster_signaling_url": "ws://127.0.0.1:5001/signaling",
"cluster_api_url": "http://127.0.0.1:3101/",
"member_since": "2022-05-09T07:44:54.160763Z",
"sora_version": "2022.1.0-canary.44",
"license_max_nodes": 10,
"license_max_connections": 100,
"license_serial_code": "SAMPLE-SRA-E001-202212-N10-100",
"license_type": "Experimental",
"connected": true
}
]`
getLicenseJSONDATA = `{
"expired_at": "2025-09",
Expand Down
3 changes: 2 additions & 1 deletion test/maximum.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ sora_average_duration_seconds 706
sora_average_setup_time_seconds 0
# HELP sora_cluster_node The sora server known cluster node.
# TYPE sora_cluster_node gauge
sora_cluster_node{mode="",node_name="[email protected]"} 0
sora_cluster_node{mode="block_new_connection",node_name="[email protected]"} 1
sora_cluster_node{mode="normal",node_name="node-01_canary_sora@10.211.55.42"} 1
sora_cluster_node{mode="normal",node_name="node-03_canary_sora@10.211.55.41"} 1
# HELP sora_cluster_raft_commit_index The latest committed Raft log index.
# TYPE sora_cluster_raft_commit_index counter
sora_cluster_raft_commit_index 10
Expand Down
3 changes: 2 additions & 1 deletion test/sora_cluster_metrics_enabled.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ sora_average_duration_seconds 706
sora_average_setup_time_seconds 0
# HELP sora_cluster_node The sora server known cluster node.
# TYPE sora_cluster_node gauge
sora_cluster_node{mode="normal",node_name="[email protected]"} 1
sora_cluster_node{mode="block_new_connection",node_name="[email protected]"} 1
sora_cluster_node{mode="normal",node_name="[email protected]"} 1
sora_cluster_node{mode="",node_name="[email protected]"} 0
# HELP sora_cluster_raft_commit_index The latest committed Raft log index.
# TYPE sora_cluster_raft_commit_index counter
sora_cluster_raft_commit_index 10
Expand Down

0 comments on commit 3441c77

Please sign in to comment.