Name no node in route-adapter's, rofi's, claude-licence-manager's and nextcloud-client's fixtures (issue 1838)
This commit is contained in:
@@ -45,15 +45,15 @@ func (b *bucketBus) Delete(_ context.Context, bucket, key string) error {
|
||||
// the entry's values are the controller's composition, copied unchanged, and no vault is asked.
|
||||
func TestAConsumerOfARouteIsToldItsNamesFromItsPlanEntry(t *testing.T) {
|
||||
bus := &bucketBus{buckets: map[string]map[string][]byte{}}
|
||||
plan, _ := json.Marshal(map[string]any{"node": "g14", "module": "gitea", "provisioning": map[string]any{
|
||||
"provisions": []any{map[string]any{"provision": ProvisionName, "provider": "novox",
|
||||
"provider-module": ModuleName, "at": "10.7.0.1", "from": "novox", "as": "mesh_g14_gitea",
|
||||
"names": map[string]any{"name": "git.example.org", "internal-name": "git.novox.internal",
|
||||
plan, _ := json.Marshal(map[string]any{"node": "node-b", "module": "gitea", "provisioning": map[string]any{
|
||||
"provisions": []any{map[string]any{"provision": ProvisionName, "provider": "node-c",
|
||||
"provider-module": ModuleName, "at": "10.7.0.1", "from": "node-c", "as": "mesh_node_b_gitea",
|
||||
"names": map[string]any{"name": "git.example.org", "internal-name": "git.node-c.internal",
|
||||
"name-web": "git.example.org"}}}}})
|
||||
if err := bus.Put(context.Background(), provider.AssignmentsBucket, "g14.gitea", plan); err != nil {
|
||||
if err := bus.Put(context.Background(), provider.AssignmentsBucket, "node-b.gitea", plan); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
p := newProvider("novox", bus, t.Logf)
|
||||
p := newProvider("node-c", bus, t.Logf)
|
||||
out, err := p.Pass(context.Background())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -62,11 +62,11 @@ func TestAConsumerOfARouteIsToldItsNamesFromItsPlanEntry(t *testing.T) {
|
||||
t.Fatalf("the pass did %+v", out)
|
||||
}
|
||||
var e provider.Entry
|
||||
if err := json.Unmarshal(bus.buckets[provider.BucketOf(ModuleName)]["g14.gitea.route"], &e); err != nil {
|
||||
if err := json.Unmarshal(bus.buckets[provider.BucketOf(ModuleName)]["node-b.gitea.route"], &e); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if e.Values["name-web"] != "git.example.org" || e.Values["name"] != "git.example.org" ||
|
||||
e.Values["internal-name"] != "git.novox.internal" || e.VaultName != "" || e.User != "" || e.Refused != "" {
|
||||
e.Values["internal-name"] != "git.node-c.internal" || e.VaultName != "" || e.User != "" || e.Refused != "" {
|
||||
t.Fatalf("the entry is %+v", e)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user