mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Cluster: Rename RoleInstance to RoleApp in service/cluster/roles.go #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -105,7 +105,7 @@ func TestGetMetrics(t *testing.T) {
|
||||
name string
|
||||
role string
|
||||
}{
|
||||
{"metrics-instance-1", string(cluster.RoleInstance)},
|
||||
{"metrics-instance-1", string(cluster.RoleApp)},
|
||||
{"metrics-service-1", string(cluster.RoleService)},
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ func TestGetMetrics(t *testing.T) {
|
||||
body := resp.Body.String()
|
||||
floatPattern := `[-+]?\d+(?:\.\d+)?(?:e[-+]?\d+)?`
|
||||
assert.Regexp(t, regexp.MustCompile(`photoprism_cluster_nodes{role="total"} `+floatPattern), body)
|
||||
assert.Regexp(t, regexp.MustCompile(`photoprism_cluster_nodes{role="instance"} `+floatPattern), body)
|
||||
assert.Regexp(t, regexp.MustCompile(`photoprism_cluster_nodes{role="app"} `+floatPattern), body)
|
||||
assert.Regexp(t, regexp.MustCompile(`photoprism_cluster_nodes{role="service"} `+floatPattern), body)
|
||||
infoPattern := `photoprism_cluster_info\{(?:cidr="[^"]*",[^}]*uuid="[^"]*"|uuid="[^"]*",[^}]*cidr="[^"]*")\} 1`
|
||||
assert.Regexp(t, regexp.MustCompile(infoPattern), body)
|
||||
|
||||
Reference in New Issue
Block a user